Re: quote_literal with NULL

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: quote_literal with NULL
Date: 2007-10-10 16:24:59
Message-ID: 00d5dbf692ffe349e94b9c34712447b5@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches


-----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(at)turnstep(dot)com
PGP Key: 0x14964AC8 200710101221
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8

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

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2007-10-10 16:35:32 Re: [COMMITTERS] pgsql: Added the Skytools extended transaction ID module to contrib as
Previous Message Magnus Hagander 2007-10-10 16:23:49 Re: Skytools committed without hackers discussion/review

Browse pgsql-patches by date

  From Date Subject
Next Message Michael Glaesemann 2007-10-10 16:51:28 Re: quote_literal with NULL
Previous Message Simon Riggs 2007-10-10 15:55:20 Re: quote_literal with NULL