Re: [GENERAL] test aggregate functions without a dummy table

2008-06-20 Thread Michael Fuhr
On Fri, Jun 20, 2008 at 10:11:08AM -0400, Tom Lane wrote: > "Willy-Bas Loos" <[EMAIL PROTECTED]> writes: > > I want to test the behavior of an an aggregate without creating a dummy > > table for it. > > But the code for it is horrible. > > Is there no simpler way? > > > select max(foo) > > from (s

Re: [GENERAL] test aggregate functions without a dummy table

2008-06-20 Thread Tom Lane
"Willy-Bas Loos" <[EMAIL PROTECTED]> writes: > I want to test the behavior of an an aggregate without creating a dummy > table for it. > But the code for it is horrible. > Is there no simpler way? > select max(foo) > from (select 1 as foo union select 2 as foo)bar; Perhaps VALUES? regression=# s

[GENERAL] test aggregate functions without a dummy table

2008-06-20 Thread Willy-Bas Loos
Hi, I want to test the behavior of an an aggregate without creating a dummy table for it. But the code for it is horrible. Is there no simpler way? select max(foo) from (select 1 as foo union select 2 as foo)bar; thx