Created
January 20, 2012 07:18
-
-
Save iakio/1645953 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ishida=# create function t(bool) returns bool as 'select true' language sql; | |
CREATE FUNCTION | |
ishida=# create aggregate exists_(*) (sfunc = t, stype = bool, initcond = false); | |
CREATE AGGREGATE | |
ishida=# select exists_(*) from pg_user; | |
exists_ | |
--------- | |
t | |
(1 row) | |
ishida=# select exists_(*) from pg_user where usename = 'hoge'; | |
exists_ | |
--------- | |
f | |
(1 row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment