Re: [HACKERS] quote_literal with NULL - Mailing list pgsql-patches

From Brendan Jurd
Subject Re: [HACKERS] quote_literal with NULL
Date
Msg-id 37ed240d0710121228w7e24764bpa76efcbfcad67e79@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] quote_literal with NULL  (Simon Riggs <simon@2ndquadrant.com>)
List 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 by date:

Previous
From: Simon Riggs
Date:
Subject: Re: [HACKERS] quote_literal with NULL
Next
From: Gregory Stark
Date:
Subject: Assertion failure with small block sizes