Re: [BUGS] BUG #6043: Compilation PLpgsql Succesful but execution bad

2011-05-28 Thread Emanuel Calvo
El 27/05/2011 16:18, "Heikki Linnakangas" < heikki.linnakan...@enterprisedb.com> escribió: > On 27.05.2011 17:05, Emanuel wrote: >> postgres=# CREATE OR REPLACE FUNCTION p_() RETURNS TABLE (i int) AS $$ >> DECLARE >> BEGIN >> SELECT * FROM p; --<<<-- here must ne RETURN QUERY .. >> END; >> $$ LANGU

Re: [BUGS] BUG #6043: Compilation PLpgsql Succesful but execution bad

2011-05-28 Thread Pavel Stehule
2011/5/28 Emanuel Calvo : > El 27/05/2011 16:18, "Heikki Linnakangas" > escribió: >> On 27.05.2011 17:05, Emanuel wrote: >>> postgres=# CREATE OR REPLACE FUNCTION p_() RETURNS TABLE (i int) AS $$ >>> DECLARE >>> BEGIN >>> SELECT * FROM p; --<<<-- here must ne RETURN QUERY .. >>> END; >>> $$ LANGUA

Re: [BUGS] BUG #6043: Compilation PLpgsql Succesful but execution bad

2011-05-28 Thread Emanuel Calvo
>> >> Thanks Heikki for your fast response! ^^ >> >> >>> The compiler would have to determine that the loop never ends, or it >>> would complain that there's no RETURN at the end. >>> >>> Many compilers for other languages do that kind of analysis, but it >>> usually only results in a warning, and

Re: [BUGS] BUG #6043: Compilation PLpgsql Succesful but execution bad

2011-05-28 Thread Pavel Stehule
2011/5/28 Emanuel Calvo : >>> >>> Thanks Heikki for your fast response! ^^ >>> >>> The compiler would have to determine that the loop never ends, or it would complain that there's no RETURN at the end. Many compilers for other languages do that kind of analysis, but it usua

[BUGS] Failed pgbench: setrandom invalid maximum number 0

2011-05-28 Thread Greg Sabino Mullane
Seeing the following on an old box I use for testing various things. Thought it was something to do with my box at first, but the problem seems to only occur in >= 8.4. But it's also not pgbench alone, as it was working fine one day, and not the next. Here's what I now get on 8.4, 9.0, and 9.1:

Re: [BUGS] Failed pgbench: setrandom invalid maximum number 0

2011-05-28 Thread Tom Lane
Greg Sabino Mullane writes: > Seeing the following on an old box I use for testing various > things. Thought it was something to do with my box at first, > but the problem seems to only occur in >= 8.4. But it's also > not pgbench alone, as it was working fine one day, and not the > next. Here

Re: [BUGS] Failed pgbench: setrandom invalid maximum number 0

2011-05-28 Thread Greg Sabino Mullane
> That's not valid syntax. Some versions of getopt() take it upon > themselves to rearrange the switch order, some do not ... Sorry: I should have made clear this happens without the -n as well, I just wanted to make the sample output a little smaller. -- Greg Sabino Mullane g...@endpoint.com