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

RE: ADD CONSTRAINT UNIQUE patch

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Patches" <pgsql-patches(at)postgresql(dot)org>
Subject: RE: ADD CONSTRAINT UNIQUE patch
Date: 2001-08-29 05:26:06
Message-ID: ECEHIKNFIMMECLEBJFIGEELECBAA.chriskl@familyhealth.com.au (view raw or flat)
Thread:
Lists: pgsql-patches
I haven't seen any replies to this patch - anything?

Chris

> -----Original Message-----
> From: pgsql-patches-owner(at)postgresql(dot)org
> [mailto:pgsql-patches-owner(at)postgresql(dot)org]On Behalf Of Christopher
> Kings-Lynne
> Sent: Friday, 24 August 2001 9:41 AM
> To: Patches
> Subject: [PATCHES] ADD CONSTRAINT UNIQUE patch
>
>
> Hi all,
>
> Here is my much-promised patch to let people add UNIQUE constraints after
> table creation time.  Big deal you say - but this patch is the
> basis of the
> next thing which is adding PRIMARY KEYs after table creation time.  (Which
> is currently impossible without twiddling catalogs)
>
> Rundown
> -------
>
> * I have made the makeObjectName function of analyze.c non-static, and
> exported it in analyze.h
>
> * I have included analyze.h and defrem.h into command.c, to support
> makingObjectNames and creating indices
>
> * I removed the 'case CONSTR_PRIMARY' clause so that it properly fails and
> says you can't add primary keys, rather than just doing nothing and
> reporting nothing!!!
>
> * I have modified the docs.
>
> Algorithm
> ---------
>
> * If name specified is null, search for a new valid constraint name.  I'm
> not sure if I should "lock" my generated name somehow tho - should I open
> the relation before doing this step?
>
> * Open relation in access exclusive mode
>
> * Check that the constraint does not already exist
>
> * Define the new index
>
> * Warn if they're doubling up on an existing index
>
> Chris
>


In response to

pgsql-patches by date

Next:From: Karel ZakDate: 2001-08-29 14:43:51
Subject: encoding names
Previous:From: Lincoln YeohDate: 2001-08-29 02:22:22
Subject: Re: Bytea/Base64 encoders for libpq - interested?

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