Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Vik Reykja <vikreykja(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Different error messages executing CREATE TABLE or ALTER TABLE to create a column "xmin"
Date: 2012-01-26 17:47:55
Message-ID: CA+TgmoaNLwfYzgNUxO7=iuiySY5RTEofrrsWha9N0qY5kZNKHQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jan 26, 2012 at 12:02 PM, Vik Reykja <vikreykja(at)gmail(dot)com> wrote:
> On Thu, Jan 26, 2012 at 17:58, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>
>> On Thu, Jan 26, 2012 at 11:29 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> > This looks reasonable to me, except that possibly the new error message
>> > text could do with a bit more thought.  It seems randomly unlike the
>> > normal message, and I also have a bit of logical difficulty with the
>> > wording equating a "column" with a "column name".  The wording that
>> > is in use in the existing CREATE TABLE case is
>> >
>> > column name \"%s\" conflicts with a system column name
>> >
>> > We could do worse than to use that verbatim, so as to avoid introducing
>> > a new translatable string.  Another possibility is
>> >
>> > column \"%s\" of relation \"%s\" already exists as a system column
>> >
>> > Or we could keep the primary errmsg the same as it is for a normal
>> > column and instead add a DETAIL explaining that this is a system column.
>>
>> I intended for the message to match the CREATE TABLE case.  I think it
>> does, except I see now that Vik's patch left out the word "name" where
>> the original string has it.  So I'll vote in favor of your first
>> option, above, since that's what I intended anyway.
>
> My intention was to replicate the CREATE TABLE message; I'm not sure how I
> failed on that particular point.  Thank you guys for noticing and fixing it
> (along with all the other corrections).

OK, committed with that further change.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2012-01-26 17:49:45 Re: Client Messages
Previous Message Fujii Masao 2012-01-26 17:42:26 Re: Pause at end of recovery