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 | ||
---|---|---|
| ||
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 table ).
There is another case where you get this error: when the given table is in public schema it results in the same error as the table doesn't exists.
Environment
Application | Confluence | ||
---|---|---|---|
Version | Server 6.15.4 | Application | Confluence|
App Version | 10.0.0 | ||
Database Type | PostgreSql |
Cause
When you want to get the data from a table from which the data is retrieved, is in a public schema in PostgreSQL, it should needs to be mentioned in the SQL select statement .as below:
Solution
Code Block | ||
---|---|---|
| ||
SELECT * FROM public. "inventory" ; |
Sample Result
The data Data from the inventory table is displayed as follows:
...