Re: Beta time

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>, "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Beta time
Date: 2001-09-19 05:32:13
Message-ID: ECEHIKNFIMMECLEBJFIGOEPHCBAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 1. Should not "break" out of loop over indexes after detecting a
> matching non-primary-key index. This allows detection of the NOTICE
> condition to distract you from detecting the ERROR condition on a
> later index. I'd suggest issuing the NOTICE inside the loop, actually,
> and not breaking at all. (See also #4)

OK.

> 2. What's with the "if (keyno > 0)"? That breaks detection of
> everything on indexes on system columns, eg OID. (Of course, the
> "rel_attrs[keyno - 1]" reference doesn't work for system columns,
> but sticking your head in the sand is no answer.)

This is code that I've borrowed from elsewhere. I'll have a good look at it
tho.

> 3. pfree'ing iname at the bottom doesn't strike me as a good
> idea; isn't that possibly part of your input querytree?

Hmmm. OK. What about in the case where iname is null and I give it a
makeObjectName?

> 4. If you're going to be so pedantic as to issue a warning notice about
> a duplicate non-primary index, it'd be polite to give the name of that
> index. Else how shall I know which index you think I should drop?

I'll improve the messages. As for me being pedantic - that's a result of
what you specified as the best behaviour should be when I posted on the
list!

You may also want to look at the CONSTR_UNIQUE block that's already been
committed, as it may also have similar issues. Any fixes I make to PRIMARY,
I will also fix in UNIQUE...

Cheers,

Chris

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 2001-09-19 06:41:43 Re: Large objects and ecpg
Previous Message Tom Lane 2001-09-19 05:07:57 Re: Beta time