1

I have a custom schema and one table in it. Following answers about searching through custom schemas I have modified by search_path to include new schema.

I can see now all objects in the new schema, so this one works:

xekata_dev=> \dt
                List of relations
 Schema |     Name     | Type  |      Owner
--------+--------------+-------+-----------------
 xekata | TestNodeBase | table | xekata_user_web
(1 row)

Now when I want to see table details I do:

xekata_dev=> \d TestNodeBase
Did not find any relation named "TestNodeBase".

which shows nothing... :(

I tried different ways to but nothing works:

xekata_dev-> \d xekata.TestNodeBase
Did not find any relation named "xekata.TestNodeBase".

I am logged as xekata_user_web and my search_path is:

xekata_dev=> show search_path;
  search_path
----------------
 xekata, public

What's going on? Why I can't see table details?

1

You created a case sensitive table name (which is strongly discouraged) so now you need to use double quotes every time you access it:

\d xekata."TestNodeBase"

I highly recommend to stop using those dreaded quoted identifies. Forget that double quotes exists when dealing with SQL.

1
  • such a facepalm! Thanks for explanining this. Snake case for the win! – zizu_zaza Jun 20 '20 at 11:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.