Re: "ADD" notice in CREATE/ALTER TABLE

Lists: pgsql-hackers
From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: "ADD" notice in CREATE/ALTER TABLE
Date: 2001-11-04 05:40:00
Message-ID: 200111040540.fA45e0R11365@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Christopher wanted "ADD" used in:

ALTER TABLE / ADD PRIMARY-UNIQUE
^^^

but not in:

CREATE TABLE / PRIMARY-UNIQUE

The problem is that the same analyze.c function is used for both cases.
I have added code to conditionally use "ADD" only in fhe first case.

--
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


From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "ADD" notice in CREATE/ALTER TABLE
Date: 2001-11-04 07:00:46
Message-ID: 3.0.5.32.20011104180046.01fce160@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

At 00:40 4/11/01 -0500, Bruce Momjian wrote:
>Christopher wanted "ADD" used in:
>
> ALTER TABLE / ADD PRIMARY-UNIQUE
> ^^^
>
>but not in:
>
>
> CREATE TABLE / PRIMARY-UNIQUE
>
>The problem is that the same analyze.c function is used for both cases.
>I have added code to conditionally use "ADD" only in fhe first case.
>

What's this in relation to? Shouldn't the syntax be:

ALTER TABLE ADD CONSTRAINT....

Or am I misreading the original message?


----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 0500 83 82 82 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "ADD" notice in CREATE/ALTER TABLE
Date: 2001-11-04 07:04:10
Message-ID: 200111040704.fA474B602731@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

> At 00:40 4/11/01 -0500, Bruce Momjian wrote:
> >Christopher wanted "ADD" used in:
> >
> > ALTER TABLE / ADD PRIMARY-UNIQUE
> > ^^^
> >
> >but not in:
> >
> >
> > CREATE TABLE / PRIMARY-UNIQUE
> >
> >The problem is that the same analyze.c function is used for both cases.
> >I have added code to conditionally use "ADD" only in fhe first case.
> >
>
> What's this in relation to? Shouldn't the syntax be:
>
> ALTER TABLE ADD CONSTRAINT....
>
> Or am I misreading the original message?

Uhh, this was a change if elog(NOTICE) display for Christopher. He
added alter table regression tests. The old message didn't have the
ADD, and I added that. My guess is that we don't spell out the word
CONSTRAINT in the message, just the ALTER and ADD parts.

--
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