Re: alter table and constraints

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: "Martin A(dot) Marques" <martin(at)math(dot)unl(dot)edu(dot)ar>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: alter table and constraints
Date: 2000-08-25 19:29:16
Message-ID: Pine.BSF.4.10.10008251223380.37476-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, 25 Aug 2000, Martin A. Marques wrote:

> On Fri, 25 Aug 2000, Peter Eisentraut wrote:
>
> > Martin A. Marques writes:
> >
> > > I don't know if this is posible, but I'm trying to add and delete
> > > constrains from a table. Is this posible and why am I having so much
> > > problems?
> >
> > Because it only works for foreign keys. If you are talking about foreign
> > key contraints then you should define "problems" better.
>
> No, it was a primary key.
> Can I change the constraint of NULL in a column? And what should I do if
> I want to add a primary key to a table?

Well, you can add a unique index to the columns and set attnotnull in
pg_attribute which should probably work for the not null portion. That's
basically what the primary key constraint is.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Marcin Inkielman 2000-08-25 19:35:28 table count limitation
Previous Message Ross J. Reedstrom 2000-08-25 19:24:06 Re: Creating a DB for another user (or...) (repost attempt)