Re: Beta time - Mailing list pgsql-hackers

From Christopher Kings-Lynne
Subject Re: Beta time
Date
Msg-id ECEHIKNFIMMECLEBJFIGAEPGCBAA.chriskl@familyhealth.com.au
Whole thread Raw
In response to Re: Beta time  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Beta time  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Attached is the CONSTR_PRIMARY switch block from command.c.  I've marked the
problem test with '@@'.

Basically the patch all seems to work properly, except that it doesn't
recognise existing primarty keys.  ie. You can go ALTER TABLE test ADD
PRIMARY KEY(a) multiple times and it will keep adding a primary key.  My ADD
UNIQUE patch that has been committed is virtually identical, and has no such
problem.

Chris

> -----Original Message-----
> From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
> Sent: Tuesday, 18 September 2001 12:41 PM
> To: Christopher Kings-Lynne
> Cc: Bruce Momjian; PostgreSQL-development
> Subject: Re: [HACKERS] Beta time
>
>
> "Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> > I am checking the indexStruct->indisprimary field, but it
> always resolves to
> > false.  indisunique works fine.  It is a trivial change to the
> ADD UNIQUE
> > code, but it doesn't work.  Viewing the system catalogs and
> '\d' both show
> > the indices as primary, but the SearchSysCache funtion believes
> that they
> > are not.
>
> Doesn't make any sense to me either.  Want to post your code?
>
>             regards, tom lane
>

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: x = NULL
Next
From: Tom Lane
Date:
Subject: Re: Beta time