public inbox for [email protected]  
help / color / mirror / Atom feed
From: Shaozhong SHI <[email protected]>
To: pgsql-sql <[email protected]>
Subject: Can we generate a series of tables in a loop and then use another loop to union all?
Date: Thu, 13 Oct 2022 16:44:39 +0100
Message-ID: <CA+i5JwaYSOw=aAQcNH3M22VkzKBhcf9pyG4VTKG3yCe-r41Sxg@mail.gmail.com> (raw)

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)  latest in thread

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: <CA+i5JwaYSOw=aAQcNH3M22VkzKBhcf9pyG4VTKG3yCe-r41Sxg@mail.gmail.com>

* 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