Valued Predicates

Started by Richard Broersma Jrover 19 years ago3 messagesdocs
Jump to latest
#1Richard Broersma Jr
rabroersma@yahoo.com

In my reading of SQL for smarties I've stumbled across syntax that is supported by Postgresql.
However, I can't find mention of it in the Postgresql Docs. Would an appropriate location for
this syntax be the "where condition" of the insert/update/select/delete statements?

i.e.

mydb=# select * from test2 where ( (a,b) >= (1,'A') ) is unknown;
a | b
---+---
3 |
(1 row)
mydb=# select * from test2 where ( (a,b) >= (1,'A') ) is true;
a | b
---+--------
1 | Albert
2 | Bert
(2 rows)
mydb=# select * from test2 where ( (a,b) >= (1,'A') ) is false;
a | b
---+---
(0 rows)
mydb=# select * from test2 where ( (a,b) >= (1,'A') ) is not false;
a | b
---+--------
1 | Albert
2 | Bert
3 |
(3 rows)
mydb=# select * from test2 where ( (a,b) >= (1,'A') ) is not true;
a | b
---+---
3 |
(1 row)
mydb=# select * from test2 where ( (a,b) >= (1,'A') ) is not true;
a | b
---+---
3 |
(1 row)

Regards,

Richard Broersma Jr.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Richard Broersma Jr (#1)
Re: Valued Predicates

Richard Broersma Jr <rabroersma@yahoo.com> writes:

In my reading of SQL for smarties I've stumbled across syntax that is supported by Postgresql.
However, I can't find mention of it in the Postgresql Docs.

Which part of this do you claim is not documented? It looks to me like
it's all covered in one of

http://developer.postgresql.org/pgdocs/postgres/functions-comparison.html
http://developer.postgresql.org/pgdocs/postgres/functions-comparisons.html#ROW-WISE-COMPARISON

regards, tom lane

#3Richard Broersma Jr
rabroersma@yahoo.com
In reply to: Tom Lane (#2)
Re: Valued Predicates

Which part of this do you claim is not documented? It looks to me like
it's all covered in one of

http://developer.postgresql.org/pgdocs/postgres/functions-comparison.html
http://developer.postgresql.org/pgdocs/postgres/functions-comparisons.html#ROW-WISE-COMPARISON

I see it now. Sorry for the false static.

Regards,

Richard Broersma Jr.