Re: Why can't I see the definition of my relations - Mailing list pgsql-general

From A. Kretschmer
Subject Re: Why can't I see the definition of my relations
Date
Msg-id 20100713051807.GA6286@a-kretschmer.de
Whole thread Raw
In response to Why can't I see the definition of my relations  (Andrew Falanga <af300wsm@gmail.com>)
Responses Re: Why can't I see the definition of my relations  (Adrian Klaver <adrian.klaver@gmail.com>)
List pgsql-general
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 <table>" I get an error saying
> that there's not relations by that name.  What?  When I do, "\d" I see
> the tables listed.  Here's a sample of the output:
>
> cgems=# \d
>         List of relations
>  Schema |  Name   | Type  | Owner
> --------+---------+-------+-------
>  public | Mineral | table | cgems
>  public | Stone   | table | cgems
> (2 rows)
>
>
> cgems=# \d Stone
> Did not find any relation named "Stone".
>
> I'm guessing that it has something to do with permissions, but I'm

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
--
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431  2EB0 389D 1DC2 3172 0C99

pgsql-general by date:

Previous
From: Andrew Falanga
Date:
Subject: Why can't I see the definition of my relations
Next
From: Alexander Pyhalov
Date:
Subject: Re: Redundant database objects.