public inbox for [email protected]
help / color / mirror / Atom feedFrom: Frank Gard <[email protected]>
To: [email protected]
Subject: Re: Can we generate a series of tables in a loop and then use another loop to union all?
Date: Thu, 13 Oct 2022 18:50:02 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <CA+i5JwaYSOw=aAQcNH3M22VkzKBhcf9pyG4VTKG3yCe-r41Sxg@mail.gmail.com>
References: <CA+i5JwaYSOw=aAQcNH3M22VkzKBhcf9pyG4VTKG3yCe-r41Sxg@mail.gmail.com>
Hi,
you can use PL/pgSQL's "EXECUTE" to do such things.
Cheers,
Frank.
Am 13.10.22 um 17:44 schrieb Shaozhong SHI:
> Can we do the following?
>
> for j in 1..max loop
> create table j as select .............
> end loop;
>
> Then, We do
>
>
> Alternatively, can we generate an empty table and append each newly generated table to it so that we end up with a whole table?
>
> Regards,
>
> David
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Can we generate a series of tables in a loop and then use another loop to union all?
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox