Re: [GENERAL] strange behaviour with sub-select and pl/pgSQL

2007-03-03 Thread Martijn van Oosterhout
On Tue, Feb 27, 2007 at 12:15:03PM +0100, Robert Partyka wrote: > Hi, > > I found PostgreSQL have strange behaviour with sub-select and pl/pgSQL, > see the case study at: > http://www.bobson.pl/pgsql/pgsql_sb1.html The PostgreSQL optimiser is pretty smart and will pull up simple sub-selects like

Re: [GENERAL] strange behaviour with sub-select and pl/pgSQL

2007-03-01 Thread Tom Lane
Robert Partyka <[EMAIL PROTECTED]> writes: > http://www.bobson.pl/pgsql/pgsql_sb1.html 8.2 won't flatten sub-selects that contain volatile functions in their targetlists... regards, tom lane ---(end of broadcast)--- TIP 6: e

[GENERAL] strange behaviour with sub-select and pl/pgSQL

2007-03-01 Thread Robert Partyka
Hi, I found PostgreSQL have strange behaviour with sub-select and pl/pgSQL, see the case study at: http://www.bobson.pl/pgsql/pgsql_sb1.html I know my version is quite old. Its most new in gentoo (hope 8.2 will be soon in gentoo portage). test=# select version();