Re: Dynamically created tables [WAS Re: "Relation x - Mailing list pgsql-general

From Gaurav Priyolkar
Subject Re: Dynamically created tables [WAS Re: "Relation x
Date
Msg-id 20011018031749.C1066@goatelecom.com
Whole thread Raw
In response to Re: Dynamically created tables [WAS Re: "Relation x  (Keary Suska <hierophant@pcisys.net>)
List pgsql-general
On Wed, Oct 17, 2001 at 08:59:23AM -0600, Keary Suska wrote:
> I would bet this requirement is really that the SQL SELECT column order must
> match the column order of the report, which is something else entirely. If

Actually, column order does not matter. The requirement is that whatever
columns have to be displayed on the report must be available in he
table/view.

> the number of 'months' columns (per your example) are fixed, and the
> specific months are known ahead of time, you could (theoretically) do
> self-join. This may have to be an outer join if it is possible that there
> were no entries for any particular month.

Therein lies the catch. As in the example, the number of months
columns as well as which months columns are not fixed. If they were,
it would be possible to create the table only once and truncate each
time.

TIA

Regards,
Gaurav.

--
Sleep:  A completely inadequate substitute for caffeine.
Attachment

pgsql-general by date:

Previous
From: Adam Haberlach
Date:
Subject: python Backend message type 0x44 arrived while idle
Next
From: Jason Earl
Date:
Subject: Re: SQL equivallent to "\ds" in psql