Re: Add column if not exists (CINE)

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Add column if not exists (CINE)
Дата
Msg-id AANLkTim-FpLcQ8E3KVLXXR6hPs7NWYxsnhV3-Zxg7H+G@mail.gmail.com
обсуждение исходный текст
Ответ на Add column if not exists (CINE)  (Kjell Rune Skaaraas <kjella79@yahoo.no>)
Список pgsql-hackers
On Fri, Jul 23, 2010 at 2:46 AM, Bernd Helmle <mailings@oopsware.de> wrote:
>
>
> --On 21. Juli 2010 17:16:13 -0400 Robert Haas <robertmhaas@gmail.com> wrote:
>
>> I get the same error message from concurrent CREATE TABLE commands
>> even without CINE...
>>
>> S1:
>> rhaas=# begin;
>> BEGIN
>> rhaas=# create table foo (id int);
>> CREATE TABLE
>>
>> S2:
>> rhaas=# begin;
>> BEGIN
>> rhaas=# create table foo (id int);
>> <blocks>
>>
>> S1:
>> rhaas=# commit;
>> COMMIT
>>
>> S2:
>> ERROR:  duplicate key value violates unique constraint
>> "pg_type_typname_nsp_index"
>> DETAIL:  Key (typname, typnamespace)=(foo, 2200) already exists.
>>
>
> Funny, never realized that before, but you're right.
>
>> I agree it would be nice to fix this.  I'm not sure how hard it is.  I
>> don't think it's the job of this patch.  :-)
>
> Yes, i agree. I would like to mark this patch "Ready for Committer", if
> that's okay for you (since you are a committer you might want to commit it
> yourself). Given that there's still some discussion in progress, i'm not
> sure about it, however. The patch itself looks fine to me and I'm traveling
> this weekend, so i don't want to hold it off as long as necessary.

As far as I can see, the other emails were regarding adding columns,
whereas this patch is about creating tables.  So I think it's OK...

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Florian Weimer
Дата:
Сообщение: Re: antisocial things you can do in git (but not CVS)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Patch for 9.1: initdb -C option