Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] quote_literal with NULL

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Brendan Jurd <direvus(at)gmail(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] quote_literal with NULL
Date: 2007-10-15 05:19:56
Message-ID: 1192425596.5282.4.camel@ebony.site (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Mon, 2007-10-15 at 12:52 +1000, Brendan Jurd wrote:
> 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.
> 
> Alright, I've improved the documentation along the lines suggested by
> Simon.  There's a full example on doing a null-safe dynamic UPDATE, as
> well as a brief discussion about being wary of using comparison
> operators with NULLs (e.g., in WHERE clauses).  Cross references
> abound.

Cool

> I did make a version of the patch which has the pg_proc entries for
> quote_literal and quote_nullable both pointing to the same internal
> function.  I thought this was a tidier solution, but it failed
> regression test #5 in opr_sanity; apparently two entries in pg_proc
> can't have the same prosrc and differing proisstrict?

Sanity prevails, I guess. :-)

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


In response to

Responses

pgsql-hackers by date

Next:From: Brendan JurdDate: 2007-10-15 05:39:35
Subject: Re: [HACKERS] quote_literal with NULL
Previous:From: Brendan JurdDate: 2007-10-15 02:52:05
Subject: Re: [HACKERS] quote_literal with NULL

pgsql-patches by date

Next:From: Brendan JurdDate: 2007-10-15 05:39:35
Subject: Re: [HACKERS] quote_literal with NULL
Previous:From: Brendan JurdDate: 2007-10-15 02:52:05
Subject: Re: [HACKERS] quote_literal with NULL

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group