Re: [HACKERS] quote_literal with NULL

Поиск
Список
Период
Сортировка
От Brendan Jurd
Тема Re: [HACKERS] quote_literal with NULL
Дата
Msg-id 37ed240d0710121228w7e24764bpa76efcbfcad67e79@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] quote_literal with NULL  (Simon Riggs <simon@2ndquadrant.com>)
Список pgsql-patches
On 10/12/07, Simon Riggs <simon@2ndquadrant.com> wrote:
> I think you should add some examples to show how we would handle an
> INSERT or an UPDATE SET with quite_nullable() and a SELECT WHERE clause
> with quote_literal. The difference is a subtle one, which is why nobody
> mentioned it before, so it needs some better docs too.
>
> A cross-ref to the functions page would help also.

Thanks for your comments Simon.  I agree about the doco, and will send
in an updated patch soon.

Looking at the patch again, I was thinking; is there actually any
point having separate underlying C functions for quote_nullable and
quote_literal?  If I merged the functions together, and pointed both
pg_proc entries at the one combined function wouldn't it have the same
effect?

Perhaps having the separate function makes the intent of the code more
obvious, but looking at the patch with fresh eyes I'm thinking it's
mostly a waste of space.

Cheers,
BJ

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

Предыдущее
От: Simon Riggs
Дата:
Сообщение: Re: [HACKERS] quote_literal with NULL
Следующее
От: Gregory Stark
Дата:
Сообщение: Assertion failure with small block sizes