pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
constaint addition to existing schema
3+ messages / 3 participants
[nested] [flat]

* constaint addition to existing schema
@ 2003-12-22 17:26 Jodi Kanter <jkanter@virginia.edu>
  2003-12-22 20:17 ` Re: constaint addition to existing schema Yuji Shinozaki <ys2n@virginia.edu>
  2003-12-24 04:06 ` Re: constaint addition to existing schema Bruno Wolff III <bruno@wolff.to>
  0 siblings, 2 replies; 3+ messages in thread

From: Jodi Kanter @ 2003-12-22 17:26 UTC (permalink / raw)
  To: pgsql-admin

I missed a constraint the last time that I loaded my database. Can I add 
an additional constraint without having to drop and rerun the table?
If not, can I do just that one table without having to do the entire schema?
Jodi
-- 

/_______________________________
//Jodi L Kanter
BioInformatics Database Administrator
University of Virginia
(434) 924-2846
jkanter@virginia.edu <mailto:jkanter@virginia.edu>/

 

/ /

/ /

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: constaint addition to existing schema
  2003-12-22 17:26 constaint addition to existing schema Jodi Kanter <jkanter@virginia.edu>
@ 2003-12-22 20:17 ` Yuji Shinozaki <ys2n@virginia.edu>
  1 sibling, 0 replies; 3+ messages in thread

From: Yuji Shinozaki @ 2003-12-22 20:17 UTC (permalink / raw)
  To: Jodi Kanter <jkanter@virginia.edu>; +Cc: pgsql-admin


You should probably read about the specifics in the documentation
(see http://www.postgresql.org/docs/)

But you could use something like (e.g.)

	ALTER TABLE ONLY question_category
		 ADD CONSTRAINT question_category_external_id_key UNIQUE (external_id);

which adds a UNIQUE constraint to the column external_id in table
question_category.  Other types of constraints have slightly different
syntax.


HTH,
yuji
----



On Mon, 22 Dec 2003, Jodi Kanter wrote:

> I missed a constraint the last time that I loaded my database. Can I add
> an additional constraint without having to drop and rerun the table?
> If not, can I do just that one table without having to do the entire schema?
> Jodi
> --
>
> /_______________________________
> //Jodi L Kanter
> BioInformatics Database Administrator
> University of Virginia
> (434) 924-2846
> jkanter@virginia.edu <mailto:jkanter@virginia.edu>/
>
>
>
> / /
>
> / /
>
>

Yuji Shinozaki	                        Computer Systems Senior Engineer
ys2n@virginia.edu			Advanced Technologies Group
(434)924-7171				Information Technology & Communication
http://www.people.virginia.edu/~ys2n    University of Virginia




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: constaint addition to existing schema
  2003-12-22 17:26 constaint addition to existing schema Jodi Kanter <jkanter@virginia.edu>
@ 2003-12-24 04:06 ` Bruno Wolff III <bruno@wolff.to>
  1 sibling, 0 replies; 3+ messages in thread

From: Bruno Wolff III @ 2003-12-24 04:06 UTC (permalink / raw)
  To: Jodi Kanter <jkanter@virginia.edu>; +Cc: pgsql-admin

On Mon, Dec 22, 2003 at 12:26:18 -0500,
  Jodi Kanter <jkanter@virginia.edu> wrote:
> I missed a constraint the last time that I loaded my database. Can I add 
> an additional constraint without having to drop and rerun the table?
> If not, can I do just that one table without having to do the entire schema?
> Jodi

ALTER TABLE should allow you to do this.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2003-12-24 04:06 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-12-22 17:26 constaint addition to existing schema Jodi Kanter <jkanter@virginia.edu>
2003-12-22 20:17 ` Yuji Shinozaki <ys2n@virginia.edu>
2003-12-24 04:06 ` Bruno Wolff III <bruno@wolff.to>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox