Skip to end of banner
Go to start of banner

Error while retrieving the data using SQL for Confluence

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Current »

Problem statement

An error occurs while retrieving data from the table under a publicĀ schema in PostgreSQL, using the SQL macro.

Sample Error messageĀ 

org.postgresql.util.PSQLException: ERROR: relation "inventory" doesnot exist Position: 15

The ideal scenario for the above error is: when there is no table exists with the given name (inventory in this case).

There is another case where you get this error: when the given table is in public schema.

Environment

ApplicationConfluence
VersionServer 6.15.4
App Version10.0.0
Database TypePostgreSql

Cause

When you want to get the data from a table which is in a public schema in PostgreSQL, it needs to be mentioned in the SQL select statement as below:

Solution

SELECT * FROM public. "inventory" ;

Sample Result

Data from the inventory table is displayed as follows:

S. noTableData
1Test-TableYes
2Test-DataNo
  • No labels