Re: leaky views, yet again
Stephen Frost <sfrost@snowman.net>
From: Stephen Frost <sfrost@snowman.net>
To: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Robert Haas <robertmhaas@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Kevin Grittner <Kevin.Grittner@wicourts.gov>, KaiGai Kohei <kaigai@ak.jp.nec.com>, Itagaki Takahiro <itagaki.takahiro@gmail.com>, KaiGai Kohei <kaigai@kaigai.gr.jp>, pgsql-hackers@postgresql.org
Date: 2010-10-07T13:23:27Z
Lists: pgsql-hackers
* Heikki Linnakangas (heikki.linnakangas@enterprisedb.com) wrote: > On 07.10.2010 16:10, Stephen Frost wrote: >> Also, even if you can't create functions (due to lack of create >> privileges on any schema), you could use DO clauses now. > > There's no way to shoehorn a DO clause into a SELECT, you can't do: > > SELECT data FROM view WHERE (DO $$ RAISE NOTICE argument; $$) = 1 Wow, I just kind of assumed you could; I'm not really sure why. Perhaps it'll be possible in the future though, so might be something to think about if/when it happens. Can't see a way to abuse the view from inside a DO or in a function in the same way either. Stephen