Re: BUG #14952: COPY fails to fill in IDENTITY column default value

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: BUG #14952: COPY fails to fill in IDENTITY column default value
Дата
Msg-id 20171230232601.GA4109@paquier.xyz
обсуждение исходный текст
Ответ на Re: BUG #14952: COPY fails to fill in IDENTITY column default value  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: BUG #14952: COPY fails to fill in IDENTITY column default value  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список pgsql-bugs
On Wed, Dec 27, 2017 at 03:43:05PM -0500, Tom Lane wrote:
> Peter Eisentraut <peter.eisentraut@2ndquadrant.com> writes:
>> That doesn't work because for the
>> identity case we don't store the expression in the catalog.  The
>> proposed patch works by storing the sequence *name* in the internal
>> structures so that it can be used in place of the stored default value.
>
> I trust you really mean you're storing an OID ...

A RangeVar is used for the proposed patch 0002. Still does it matter? In
the scenario proposed here, which is to fix ALTER TABLE ADD COLUMN
GENERATED, then the sequence gets created and visible only once the
transaction adding the column has been created.

     char        identity;        /* attidentity setting */
+    RangeVar   *identitySequence;
     CollateClause *collClause;    /* untransformed COLLATE spec, if any */
It mat be better to tell that this is used to create a sequence in the
same transaction as the one doing the parsing.
--
Michael

Вложения

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

Предыдущее
От: Devrim Gündüz
Дата:
Сообщение: Re: BUG #14995: repmgr_funcs lib is missing in rpm
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: 10.1: hash index size exploding on vacuum full analyze