Why can't I see the column names of a table?

后端 未结 1 845
攒了一身酷
攒了一身酷 2020-12-14 22:02

So I made some tables programatically and I want to verify it\'s structure is what I think it is.

>Rocko=# \\c Rocko
Password for user Rocko:
psql (8.4.4,         


        
相关标签:
1条回答
  • 2020-12-14 22:14

    PostgreSQL converts unquoted identifiers (such as table and column names) to lower case by default; the standard says that identifiers are supposed to be normalized to upper case but that's not important here. So, when you say this:

    \d Test
    

    PostgreSQL considers that the same as \d test. You probably have a table that was created with a quoted name:

    create table "Test" ( ...
    

    so that its name is case sensitive and must be quoted (with double quotes) every time it is referenced. So try quoting the name:

    \d "Test"
    
    0 讨论(0)
提交回复
热议问题