Re: Why can't I see the definition of my relations
| От | Adrian Klaver |
|---|---|
| Тема | Re: Why can't I see the definition of my relations |
| Дата | |
| Msg-id | 201007130812.06433.adrian.klaver@gmail.com обсуждение исходный текст |
| Ответ на | Re: Why can't I see the definition of my relations ("A. Kretschmer" <andreas.kretschmer@schollglas.com>) |
| Список | pgsql-general |
On Monday 12 July 2010 10:18:07 pm A. Kretschmer wrote:
>
> No, the reason is another:
>
> test=# create table "Stone"(id serial);
> NOTICE: CREATE TABLE will create implicit sequence "Stone_id_seq" for
> serial column "Stone.id" CREATE TABLE
> test=*# \d Stone
> Did not find any relation named "Stone".
> test=*# \d "Stone"
> Table "public.Stone"
> Column | Type | Modifiers
> --------+---------+------------------------------------------------------
> id | integer | not null default nextval('"Stone_id_seq"'::regclass)
>
>
>
> You have to use the " if the table-name contains upper-case characters.
>
>
> Andreas
Just for completeness, it is the quoted table name that causes the case
sensitivity. If you do as below than the table name is folded to lower case.
test=> create table Stone(id serial);
NOTICE: CREATE TABLE will create implicit sequence "stone_id_seq" for serial
column "stone.id"
CREATE TABLE
test=> \d Stone
Table "public.stone"
Column | Type | Modifiers
--------+---------+----------------------------------------------------
id | integer | not null default nextval('stone_id_seq'::regclass)
--
Adrian Klaver
adrian.klaver@gmail.com
В списке pgsql-general по дате отправления: