Re: quote_literal with NULL

From: "Brendan Jurd" <direvus(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>, pgsql-hackers(at)postgresql(dot)org, "Simon Riggs" <simon(at)2ndquadrant(dot)com>, "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
Subject: Re: quote_literal with NULL
Date: 2007-10-11 08:10:03
Message-ID: 37ed240d0710110110w2bceab9cybc19b117278f5c7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

On 10/11/07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Well, it's clearly useful in INSERT and UPDATE. For WHERE cases, you
> might or might not be able to use it, but I note that quote_nullable()
> would work much more like what happens if you use a parameter symbol
> and then bind NULL as the actual parameter value ...
>
> In hindsight we should probably have done quote_literal the way the OP
> suggests, but I concur that it's too late to change it. An additional
> function seems a reasonable compromise.

quote_nullable() works for me. I'll write up a patch.

Cheers,
BJ

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-10-11 08:21:33 Re: Plan invalidation vs temp sequences
Previous Message Heikki Linnakangas 2007-10-11 07:44:28 Re: Plan invalidation vs temp sequences

Browse pgsql-patches by date

  From Date Subject
Next Message Heikki Linnakangas 2007-10-11 08:36:22 Re: Including Snapshot Info with Indexes
Previous Message Gokulakannan Somasundaram 2007-10-11 04:58:59 Re: Including Snapshot Info with Indexes