public inbox for [email protected]  
help / color / mirror / Atom feed
From: Richard Broersma Jr <[email protected]>
To: [email protected]
Subject: Valued Predicates
Date: Wed, 15 Nov 2006 21:55:21 -0800 (PST)
Message-ID: <[email protected]> (raw)

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.



view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected]
  Subject: Re: Valued Predicates
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox