Why can't I see the definition of my relations
Why can't I see the definition of my relations
От:
Andrew Falanga <af300wsm@gmail.com>
Дата:
Hi, I just finished defining a couple of tables with PgAdmin III and I'm seeing something peculiar. I'm not sure what the problem is. When I connect to the DB using psql and do "\d
Re: Why can't I see the definition of my relations
От:
"A. Kretschmer" <andreas.kretschmer@schollglas.com>
Дата:
In response to Andrew Falanga : > Hi, > > I just finished defining a couple of tables with PgAdmin III and I'm > seeing something peculiar. I'm not sure what the problem is. When I > connect to the DB using psql and do "\d
Re: Why can't I see the definition of my relations
От:
Adrian Klaver <adrian.klaver@gmail.com>
Дата:
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
Re: Why can't I see the definition of my relations
От:
Andrew Falanga <af300wsm@gmail.com>
Дата:
On Jul 13, 9:12 am, adrian.kla...@gmail.com (Adrian Klaver) wrote:
> 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.kla...@gmail.com
>
> --
> Sent via pgsql-general mailing list (pgsql-gene...@postgresql.org)
> To make changes to your subscription:http://www.postgresql.org/mailpref/pgsql-general
Thank you both for you help. I look forward to accessing the table
tonight when I get home.
For my own sake, would there happen to be any documentation on-line
that I could read up on regarding this? (The PostgreSQL website
perhaps? Is this discussed in their documentation?)
Thanks,
Andy
Re: Why can't I see the definition of my relations
От:
Adrian Klaver <adrian.klaver@gmail.com>
Дата:
On 07/13/2010 09:27 AM, Andrew Falanga wrote: > On Jul 13, 9:12 am, adrian.kla...@gmail.com (Adrian Klaver) wrote: > > Thank you both for you help. I look forward to accessing the table > tonight when I get home. > > For my own sake, would there happen to be any documentation on-line > that I could read up on regarding this? (The PostgreSQL website > perhaps? Is this discussed in their documentation?) > > Thanks, > Andy > www.postgresql.org/docs/8.4/interactive/sql-syntax-lexical.html#SQL-SYNTAX-IDENTIFIERS Go to end of the above section for documentation on case folding. -- Adrian Klaver adrian.klaver@gmail.com