Re: Unable to add a new column to a table named "in" (look like a bug ...) - Mailing list pgsql-general

From David Gagnon
Subject Re: Unable to add a new column to a table named "in" (look like a bug ...)
Date
Msg-id 015401c8a09e$1fa9d580$6701a8c0@cesart.local
Whole thread Raw
In response to Re: Unable to add a new column to a table named "in" (look like a bug ...)  ("Adam Rich" <adam.r@sbcglobal.net>)
List pgsql-general
Hi Adam,

Yes your right .. here is the output.  The only thing is that in PGadminIII
I just see the "in" table....

Thanks for your help anyway!

Have a good day
David

Welcome to psql 8.3.0, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

Warning: Console code page (437) differs from Windows code page (1252)
         8-bit characters might not work correctly. See psql reference
         page "Notes for Windows users" for details.

postgres=# \?
General
  \c[onnect] [DBNAME|- USER|- HOST|- PORT|-]
                 connect to new database (currently "postgres")
  \cd [DIR]      change the current working directory
  \copyright     show PostgreSQL usage and distribution terms
  \encoding [ENCODING]
                 show or set client encoding
  \h [NAME]      help on syntax of SQL commands, * for all commands
  \q             quit psql
  \set [NAME [VALUE]]
                 set internal variable, or list all if no parameters
  \timing        toggle timing of commands (currently off)
  \unset NAME    unset (delete) internal variable
  \prompt [TEXT] NAME
                 prompt user to set internal variable
  \! [COMMAND]   execute command in shell or start interactive shell

Query Buffer
  \e [FILE]      edit the query buffer (or file) with external editor
  \g [FILE]      send query buffer to server (and results to file or |pipe)
  \p             show the contents of the query buffer
  \r             reset (clear) the query buffer
  \w FILE        write query buffer to file

^Cpostgres=# \c reference
You are now connected to database "reference".
reference=# \d "IN"
                       Table "public.IN"
 Column  |            Type             |       Modifiers
---------+-----------------------------+------------------------
 innum   | character varying(10)       | not null
 ts      | timestamp without time zone | not null default now()
 indescs | character varying[]         |
 descs   | character varying[]         |

reference=# \d "in"
                         Table "public.in"
   Column   |            Type             |       Modifiers
------------+-----------------------------+------------------------
 innum      | character varying(10)       | not null
 indesc_pri | character varying(100)      |
 indesc_sec | character varying(100)      |
 ts         | timestamp without time zone | not null default now()
 indescs    | character varying[]         |
Indexes:
    "in_pk" PRIMARY KEY, btree (innum)

reference=#

-----Message d'origine-----
De : pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] De la part de Adam Rich
Envoyé : Thursday, April 17, 2008 10:33 AM
À : 'David Gagnon'; pgsql-general@postgresql.org
Objet : Re: [GENERAL] Unable to add a new column to a table named "in" (look
like a bug ...)

>
>   It worked Thanks!! But there is definitly something wrong with the
> error
> message I got (right?):
>
> reference=# alter table "IN" add column INDESCS VARCHAR[];
> ERROR:  column "indescs" of relation "IN" already exists
>

I don't know, what do you see when you \d "IN" ?

When you use double-quotes, capitalization is significant,
So "in" and "IN" and "In" are all different tables.  This error
message means you already have an upper-case "IN" table and it
already has a column INDESCS.



--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



pgsql-general by date:

Previous
From: "Adam Rich"
Date:
Subject: Re: Unable to add a new column to a table named "in" (look like a bug ...)
Next
From: "David Gagnon"
Date:
Subject: Re: Unable to add a new column to a table named "in" (look like a bug ...)