[ 
https://issues.apache.org/jira/browse/NETBEANS-1140?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16905238#comment-16905238
 ] 

Tapio Koskinen commented on NETBEANS-1140:
------------------------------------------

I think this is caused by call to getSchemaName(i) returning empty string in 
org.netbeans.modules.db.dataview.meta.DBMetaDataFactory#generateDBTables 
(https://github.com/apache/netbeans/blob/master/ide/db.dataview/src/org/netbeans/modules/db/dataview/meta/DBMetaDataFactory.java).

PostgreSQL's JDBC code and related discussion: 
[https://github.com/pgjdbc/pgjdbc/blob/master/pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSetMetaData.java]
 [https://github.com/pgjdbc/pgjdbc/issues/538]

Maybe schema name could be parsed from the query string? Seems a bit 
hacky/non-trivial, but something like that is already done for Oracle in 
DBMetaDataFactory#adjustTableMetadata().

> Can't insert or delete records on non-default schema
> ----------------------------------------------------
>
>                 Key: NETBEANS-1140
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-1140
>             Project: NetBeans
>          Issue Type: Bug
>    Affects Versions: 9.0
>            Reporter: Tapio Koskinen
>            Priority: Minor
>
> There are some tables in "quartz" schema (PostgreSQL database). Other tables 
> are in "public" schema. In Services-component I can right click those tables, 
> select "View Data..." and table's data is displayed. If I now try to delete a 
> selected record, I get error "Error code 0, SQL state 42P01 Delete command 
> filed: ERROR: relation "qrtz_cron_triggers" does not exist Position: 13"
> PostgreSQL's log has:
> 2018-08-15 09:56:03.795 EEST [16908] ERROR: relation "qrtz_cron_triggers" 
> does not exist at character 13
> 2018-08-15 09:56:03.795 EEST [16908] STATEMENT: DELETE FROM 
> "qrtz_cron_triggers" WHERE "sched_name" = $1 AND "trigger_name" = $2 AND 
> "trigger_group" = $3 
> 2018-08-15 09:56:03.795 EEST [16908] LOG: execute S_1: ROLLBACK
>  
> So it seems that the schema name is not included in the query when issuing 
> delete statements. Using "Insert Record(s)" functionality fails with the same 
> "relation does not exist" error.
> Records can be removed manually if schema name is included.



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to