Grokbase
x

[BUGS] BUG #3543: ARRAY(SELECT ...) contruct yields NULL without rows

View TopicPrint | Flat  Thread  Threaded
1) Jens-Wolfhard Schicke The following bug has been logged online: Bug reference: 3543 Logged by: Jens Schicke Email...
| +1 vote (Anchor)
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
The following bug has been logged online:

Bug reference:      3543
Logged by:          Jens Schicke
Email address:      [email protected: j.sc...@asco.de]
PostgreSQL version: 8.2.4
Operating system:   GNU/Linux
Description:        ARRAY(SELECT ...) contruct yields NULL without rows
Details:

SELECT ARRAY(SELECT 1 WHERE 1 = 0) IS NULL; -- true

this leads imho to inconsistencies later, if tests with = ANY or similar are
done.

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq
2) Jim Nasby And just what would you have it return? An array with no elements is by definition NULL.
| +1 vote (Anchor)
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Thu, Aug 16, 2007 at 11:11:49AM +0000, Jens Schicke wrote:
>
> The following bug has been logged online:
>
> Bug reference:      3543
> Logged by:          Jens Schicke
> Email address: [email protected: j.sc...@asco.de]
> PostgreSQL version: 8.2.4
> Operating system:   GNU/Linux
> Description: ARRAY(SELECT ...) contruct yields NULL without rows
> Details:
>
> SELECT ARRAY(SELECT 1 WHERE 1 = 0) IS NULL; -- true

And just what would you have it return? An array with no elements is by
definition NULL.
--
Decibel!, aka Jim Nasby [email protected: de...@decibel.org]
EnterpriseDB http://enterprisedb.com 512.569.9461 (cell) -----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.3 (FreeBSD)

iD8DBQFGxFqGdO30qud8SkgRAjdFAJ4yqRF9r2+8rbKDPUEmifwP/72nTwCgkNRz
93IgFbZnqH7LtdeIEr2mfo0=
=XSkB
-----END PGP SIGNATURE-----
spacer
View TopicPrint | Flat  Thread  Threaded
Home > Groups > PostgreSQL - Bugs > [BUGS] BUG #3543: ARRAY(SELECT ...) contruct yields NULL without rows (2 posts)