Skip site navigation (1) Skip section navigation (2)

confused newbie (to pg not db's)

From: mike <mike(at)redtux1(dot)uklinux(dot)net>
To: pgsql-interfaces(at)postgresql(dot)org
Subject: confused newbie (to pg not db's)
Date: 2004-02-12 14:15:24
Message-ID: 1076595324.3818.8.camel@datacc (view raw or flat)
Thread:
Lists: pgsql-interfaces
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

this is from psql with PG 7.3.2

any help appreciated


Responses

pgsql-interfaces by date

Next:From: Jeroen T. VermeulenDate: 2004-02-12 14:32:08
Subject: Re: Trouble compiling C++ programs: libpq++ error in Red Hat v9
Previous:From: Mike S. NowostawskyDate: 2004-02-12 01:54:57
Subject: Trouble compiling C++ programs: libpq++ error in Red Hat v9

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group