Re: [HACKERS] quote_literal with NULL

From: "Brendan Jurd" <direvus(at)gmail(dot)com>
To: "Simon Riggs" <simon(at)2ndquadrant(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] quote_literal with NULL
Date: 2007-10-12 19:28:39
Message-ID: 37ed240d0710121228w7e24764bpa76efcbfcad67e79@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On 10/12/07, Simon Riggs <simon(at)2ndquadrant(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Luis Vargas 2007-10-12 20:56:17 fmgr_info_cxt_security() screwing memory ?
Previous Message Simon Riggs 2007-10-12 18:16:55 Re: First steps with 8.3 and autovacuum launcher

Browse pgsql-patches by date

  From Date Subject
Next Message Gokulakannan Somasundaram 2007-10-13 05:42:54 Re: Another Idea: Try Including snapshot with TOAS (was: Including Snapshot Info with Indexes)
Previous Message Gokulakannan Somasundaram 2007-10-12 15:16:29 Re: Including Snapshot Info with Indexes