test aggregate functions without a dummy table

From: "Willy-Bas Loos" <willybas(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: test aggregate functions without a dummy table
Date: 2008-06-20 11:34:59
Message-ID: 1dd6057e0806200434q2cc34ef3l4394133f9c19bb4e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Clark 2008-06-20 11:47:57 Re: renumber table
Previous Message Gregory Williamson 2008-06-20 10:55:37 Re: Need to update all entries of one table based on an earlier backup