471,337 Members | 1,158 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,337 software developers and data experts.

detecting a NULL box


Does anybody know how to detect a NULL in a geometric box type?

When I execute the following sql statement (coords is a box type)
autotest=# select coords from dlg_control limit 1
autotest-# \g
coords
--------

(1 row)

So, I have data that contains a "NULL" in the coords column, but when I
test on box(NULL) I don't get any data...
autotest=# select coords from dlg_control where coords=box(NULL) limit 1
autotest-# \g
coords
--------
(0 rows)

Any ideas?
Thanks,
Dennis

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 11 '05 #1
1 1434
I don't know why you want to list a NULL with no other info, but here
you go:

SELECT coords FROM dlg_control WHERE coords IS NULL LIMIT 1;

ds******@lexmark.com wrote:
Does anybody know how to detect a NULL in a geometric box type?

When I execute the following sql statement (coords is a box type)
autotest=# select coords from dlg_control limit 1
autotest-# \g
coords
--------

(1 row)

So, I have data that contains a "NULL" in the coords column, but when I
test on box(NULL) I don't get any data...
autotest=# select coords from dlg_control where coords=box(NULL) limit 1
autotest-# \g
coords
--------
(0 rows)

Any ideas?
Thanks,
Dennis

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings


--
Guy Fraser
Network Administrator
The Internet Centre
780-450-6787 , 1-888-450-6787

There is a fine line between genius and lunacy, fear not, walk the
line with pride. Not all things will end up as you wanted, but you
will certainly discover things the meek and timid will miss out on.

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 11 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by bissatch | last post: by
reply views Thread by Hal Vaughan | last post: by
19 posts views Thread by Gav | last post: by
6 posts views Thread by Rob | last post: by
7 posts views Thread by Aarti | last post: by
9 posts views Thread by D. Shane Fowlkes | last post: by
5 posts views Thread by corepaul | last post: by
15 posts views Thread by RobG | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.