Re: [PATCHES] [HACKERS] quote_literal with NULL

2008-03-24 Thread Brendan Jurd
On 23/03/2008, Tom Lane <[EMAIL PROTECTED]> wrote: > > Applied with some revisions to sync it with CVS HEAD --- primarily, > since we now have a quote_literal(anyelement) function, it seemed > important to add a quote_nullable(anyelement) variant. I also > editorialized on the documentation ex

Re: [PATCHES] [HACKERS] quote_literal with NULL

2008-03-22 Thread Tom Lane
"Brendan Jurd" <[EMAIL PROTECTED]> writes: > [ second version of quote_nullable patch ] Applied with some revisions to sync it with CVS HEAD --- primarily, since we now have a quote_literal(anyelement) function, it seemed important to add a quote_nullable(anyelement) variant. I also editorialized

Re: [PATCHES] [HACKERS] quote_literal with NULL

2007-11-04 Thread Bruce Momjian
This has been saved for the 8.4 release: http://momjian.postgresql.org/cgi-bin/pgpatches_hold --- Brendan Jurd wrote: > Hi patchers, > > Per discussion on -hackers, I've implemented a new internal function > quote_

Re: [PATCHES] [HACKERS] quote_literal with NULL

2007-10-15 Thread Tom Lane
"Brendan Jurd" <[EMAIL PROTECTED]> writes: > I'm all for the prevalance of sanity, but I'm not really clear on what > about the above scenario is not sane. Well, a situation like that just calls into question whether there's been a mistake --- in particular whether the underlying function is reall

Re: [PATCHES] [HACKERS] quote_literal with NULL

2007-10-15 Thread Brendan Jurd
On 10/12/07, Simon Riggs <[EMAIL PROTECTED]> 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

Re: [PATCHES] [HACKERS] quote_literal with NULL

2007-10-14 Thread Brendan Jurd
On 10/15/07, Simon Riggs <[EMAIL PROTECTED]> wrote: > > 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

Re: [PATCHES] [HACKERS] quote_literal with NULL

2007-10-14 Thread Simon Riggs
On Mon, 2007-10-15 at 12:52 +1000, Brendan Jurd wrote: > On 10/12/07, Simon Riggs <[EMAIL PROTECTED]> 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

Re: [PATCHES] [HACKERS] quote_literal with NULL

2007-10-12 Thread Brendan Jurd
On 10/12/07, Simon Riggs <[EMAIL PROTECTED]> 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

Re: [PATCHES] [HACKERS] quote_literal with NULL

2007-10-11 Thread Simon Riggs
On Fri, 2007-10-12 at 02:11 +1000, Brendan Jurd wrote: > Per discussion on -hackers, I've implemented a new internal function > quote_nullable, as an alternative to quote_literal. The difference is > that quote_nullable returns the text value 'NULL' on NULL input, which > is suitable for insertio

Re: [PATCHES] [HACKERS] quote_literal with NULL

2007-10-11 Thread Brendan Jurd
Hi patchers, Per discussion on -hackers, I've implemented a new internal function quote_nullable, as an alternative to quote_literal. The difference is that quote_nullable returns the text value 'NULL' on NULL input, which is suitable for insertion into an SQL statement. The idea is that when yo