select exists (select oid from users)
От | The Hermit Hacker |
---|---|
Тема | select exists (select oid from users) |
Дата | |
Msg-id | Pine.BSF.4.21.0002292316110.434-100000@thelab.hub.org обсуждение исходный текст |
Список | pgsql-hackers |
============================== From: Don Baccus <dhogaza@pacifier.com> The query "select exists (select oid from users)" is very non-standard and I'm surprised it works. I can accept that some very weird queries might mess up PL/pgSQL, but it would be nice if the backend wouldn't crash. Again, PG7.0 beta (actually, a snapshot taken four days earlier, I've given up on the official beta for the time being) acs=# select exists (select oid from users);?column? ----------t (1 row) acs=# create function foo(integer) returns boolean as ' acs'# begin acs'# return exists (select oid from users); acs'# end;' language 'plpgsql'; CREATE acs=# select foo(3); pqReadData() -- backend closed the channel unexpectedly. This probably means the backend terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. !# \q [acs@gyrfalcon acs]$ psql Welcome to psql, the PostgreSQL interactive terminal. ... acs=# create function bar(integer) returns boolean as ' acs'# begin acs'# return ''t'' where exists (select oid from users); acs'# end;' language 'plpgsql'; CREATE acs=# select bar(3);bar -----t (1 row) - Don Baccus, Portland OR <dhogaza@pacifier.com> Nature photos, on-line guides, Pacific Northwest Rare Bird Alert Serviceand other goodies at http://donb.photo.net.
В списке pgsql-hackers по дате отправления: