The Netezza plugin adds Netezza-specific functionality to the SQuirreL SQL Client. Read access is required to the following system views in order for this additional functionality to work correctly:
All objects can be found in folders by object type beneath the tree node of the schema (Netezza User), which is also directly beneath the tree node for the catalog (Netezza Database). In the screenshot below the catalog (or database) is RManning46_DB and the schema (or user) is RManning46.
Synonyms, Sequences, Stored Procedures and Views are shown in the object tree when using this plugin. Synonyms, Stored Procedures and Views have a "Source" tab which displays the source of the selected object. Synonyms also have a "Details" tab which gives synonym-specific information about the object.
The source code for triggers is derived from the following query:
SELECT 'create synonym ' || synonym_name || ' for ' || refobjname FROM _v_synonym where refdatabase = ? and refschema = ? and synonym_name like ?
The information in the details tab for a synonym is derived from the following query:
SELECT SYNONYM_NAME, refobjname as Referenced_Object, refdatabase as Referenced_Database , refdatabase || '.' || synonym_name as Qualified_Name FROM _v_synonym where synonym_name = ? and refschema = ?
The source code for stored procedures is derived from the following query:
SELECT 'create or replace procedure ' || proceduresignature || ' returns ' || returns || ' LANGUAGE NZPLSQL AS BEGIN_PROC ' || proceduresource || ' END_PROC;' FROM _v_procedure WHERE owner = ? and procedure = ?
The source code for views is derived from the following query:
SELECT 'create or replace view ' || v.VIEWNAME || ' as ' || v.definition FROM _v_view v, _v_objs_owned o where v.objid = o.objid and o.DATABASE = ? and v.VIEWNAME = ?