Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Problem Statement

Info
When trying to retrieve data using SQL with PostgreSQL profile with public tables(table name is inventory) as  SELECT * FROM inventory; will result in below error:

...

Problem statement

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

Sample Error message 

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

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

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

Environment

Confluence
ApplicationConfluence
VersionServer 6.15.4Application
App Version10.0.0
Database TypePostgreSql

Cause

...

bgColor#f9ecc5

...

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:

...

Image Added

Solution

Code Block
themeMidnight
SELECT * FROM public."inventory" ;

Sample Result

...

It will display the data in the table inventoryData from the inventory table is displayed as follows:

S. noTableData
1Test-TableYes
2Test-DataNo

...