Re: Add regression test for ALTER TABLE / ADD UNIQUE

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: chriskl(at)familyhealth(dot)com(dot)au
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Add regression test for ALTER TABLE / ADD UNIQUE
Date: 2001-10-29 18:31:44
Message-ID: 200110291831.f9TIViK07128@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

> OK,
>
> I've attached a patch that adds some regression tests for alter table / add
> unique.
>
> One thing that I don't understand tho, is why when adding a unique
> constraint, the notice you receive refers to ALTER TABLE/UNIQUE, where in my
> code it has ALTER TABLE/ADD UNIQUE - I don't understand...

The cause is that the message is coming from parser/analyze.c rather
than commands/command.c. You are right to be concerned about the
consistent wording and spacing because there are multiple words on each
side of the slash so you really need the spaces for added visibility:

ALTER TABLE / ADD UNIQUE

> I've only had the chance to test this test suite on my own machine, so you
> may wish to test it elsewhere before committing it.
>
> It includes tests for multi-column indices and indices over oid columns.

I would like to apply the following patch to make your patch show ADD
UNIQUE instead of just UNIQUE and add spacing around the slash in a few
cases that were inconsistent.

The only question I have is how to handle backend/po files. I can
easily add the spaces to match the new format if that is OK with the po
maintainers.

I will hold your patch and mine in the queue to see if people have
comments on this and apply accordingly.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

Attachment Content-Type Size
unknown_filename text/plain 41.0 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2001-10-29 19:27:27 Re: NULLs and sort order
Previous Message Zhenbang Wei 2001-10-29 18:00:22 Traditional Chinese error messages for JDBC