Re: BUG #15623: Inconsistent use of default for updatable view

Поиск
Список
Период
Сортировка
От Dean Rasheed
Тема Re: BUG #15623: Inconsistent use of default for updatable view
Дата
Msg-id CAEZATCWFURkSW8CsKih=hqpOGz+JkvuBDtGmtWc-GrZEfahjFg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #15623: Inconsistent use of default for updatable view  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Список pgsql-bugs
On Thu, 28 Feb 2019 at 07:47, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
>
> +                if (attrno == 0)
> +                    elog(ERROR, "Cannot set value in column %d to
> DEFAULT", i);
>
> Maybe: s/Cannot/cannot/g
>

Ah yes, you're right. That is the convention.


> +        Assert(list_length(sublist) == numattrs);
>
> Isn't this Assert useless, because we're setting numattrs to
> list_length(<first-sublist>) and transformInsertStmt ensures that all
> sublists are same length?
>

Well possibly I'm being over-paranoid, but given that it may have come
via a previous invocation of rewriteValuesRTE() that may have
completely rebuilt the lists, it seemed best to be sure that it hadn't
done something unexpected. It's about to use that to read from the
attrnos array, so it might read beyond the array bounds if any of the
prior logic was faulty.

Thanks for looking.

Regards,
Dean


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

Предыдущее
От: "Serbin, Ilya"
Дата:
Сообщение: Re: BUG #15660: pg_dump memory leaks when dumping LOBs
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: BUG #15661: Error connecting to the server