Re: quote_literal with NULL - Mailing list pgsql-hackers

From Greg Sabino Mullane
Subject Re: quote_literal with NULL
Date
Msg-id 00d5dbf692ffe349e94b9c34712447b5@biglumber.com
Whole thread Raw
In response to Re: quote_literal with NULL  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: quote_literal with NULL
Re: quote_literal with NULL
List pgsql-hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160


> Perhaps have quote_nullable() then as well?
>
> You then use quote_nullable() in INSERT and UPDATE SET clauses and
> quote_literal() in SELECT WHERE clauses. 

I still don't see the use case. Wouldn't your app still need to check 
for nullability anyway, to avoid " = NULL"? (Aside: seems to me that 
SET foo = NULL; really should be SET foo TO NULL; to be consistent 
with WHERE foo IS NULL;)

- --
Greg Sabino Mullane greg@turnstep.com
PGP Key: 0x14964AC8 200710101221
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

-----BEGIN PGP SIGNATURE-----

iD8DBQFHDPwyvJuQZxSWSsgRAwGaAJ92ICR+MyclkmWvJRkC4vazIw+b0ACghpZt
WXbCxe0abFlp8jwr0ol/fac=
=oWqD
-----END PGP SIGNATURE-----




pgsql-hackers by date:

Previous
From: Magnus Hagander
Date:
Subject: Re: Skytools committed without hackers discussion/review
Next
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql: Added the Skytools extended transaction ID module to contrib as