For Netezza 7.0.3 and below, improve the SQL for DESC to ignore the owner
In releases prior to Netezza 7.0.3, the Netezza system supported one default schema per database. The default and only schema matched the name of the database user who created the database.
If users specified a schema for objects, the Netezza system ignored the schema and used the default schema for all operations
To reproduce:
Use netezza jdbc driver with version 6 and connect to netezza 7
Go to NZM database and open a query window
Type table name NZ_MZT_CONF and hit CTRL D -> You get table does not exist
Next execute a SELECT * from NZ_MZT_CONF and you get the result set
So if the database can find the table without specifying the SCHEMA in the SELECT query, the user expects the CTRL D or DESCRIBE to work.
If we look at the SQL we are generating for DESC we can see that in the WHERE clause we restrict with the condition AND c.owner = 'schema name'
If we remove this, this will solve the users problem.
Other things to note are SCHEMA is actually an ALIAS for DATABASE, so we need to look into the dependencies of changing this condition.
I have changed the describe command so it will not take schema in to consideration for netezza. This will only affect the extraction of the table informations and its constraints. Netezza 7.0.3 has been modified to actually become a schema based database and will need its on work to make this function. I believe there is another issue filed for this.
Issue #11418 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 14.0.8-2 |
No time estimate |
I have changed the describe command so it will not take schema in to consideration for netezza. This will only affect the extraction of the table informations and its constraints. Netezza 7.0.3 has been modified to actually become a schema based database and will need its on work to make this function. I believe there is another issue filed for this.