Re: Confused newbie (to PG not DB's)

From: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>
To: mike <mike(at)bristolreccc(dot)co(dot)uk>
Cc: "<pgsql-general(at)postgresql(dot)org> <pgsql-general(at)postgresql(dot)org>" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Confused newbie (to PG not DB's)
Date: 2004-02-15 20:22:11
Message-ID: 20040215122030.H89888@megazone.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Tue, 10 Feb 2004, mike wrote:

> I have setup a database that I am the owner of, and I am trying to setup
> constraints and it doesn't seem to be working
>
> Example
>
> - Table: public."Invoice_Header"
>
> -- DROP TABLE public."Invoice_Header";
>
> CREATE TABLE public."Invoice_Header"
> (
> "Inv_ID" int4 NOT NULL DEFAULT nextval('public."Invoice
> Header_ID_seq"'::text),
> "client_ID" int2 NOT NULL,
> payable_recievable varchar(5),
> "date_CREATED" date,
> "AMOUNT" money,
> amount_paid money,
> date_paid date
> ) WITH OIDS;
>
> I am trying to make Inv_ID a primary key as follows
>
> alter table Invoice_Header ADD CONSTRAINT PK_inv PRIMARY KEY (Inv_ID)
>
> which runs without error, but nothing changes

Hmm, I don't have 7.3.x to test on here, but that should have errored
unless you double quoted the the table and column name in the alter table.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2004-02-15 21:08:59 Re: Pg + perl + apache
Previous Message Adam Ruth 2004-02-15 19:32:28 Re: PostgreSQL Indexing versus MySQL