public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Matthew Mellon <[email protected]>
Cc: [email protected]
Subject: Re: INSERT ... SELECT nonpositional syntax
Date: Mon, 20 May 2024 18:58:05 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <CADNMQCJb=ivwfjeVV=2V8eG24MJLxWC_stp3hW+JTJ8=zwMWJg@mail.gmail.com>
References: <CADNMQCJb=ivwfjeVV=2V8eG24MJLxWC_stp3hW+JTJ8=zwMWJg@mail.gmail.com>

Matthew Mellon <[email protected]> writes:
> SAP's products have a nice feature not found in the ANSI standards for the
> INSERT ... SELECT syntax: WITH AUTO NAME. Assume you have a table that
> looks something like this:
> ...
> INSERT INTO TableX
> WITH AUTO NAME
> SELECT a i,
>   b j,
>   c k
> FROM TableY;

> I'm not complaining here, but just wondering if there is a way that the
> syntax can be extended at this level using an extension, or if there is a
> fighting chance of extending the syntax in the base product?

I recall that we've discussed having some way to do this; but not with
that particular syntax.  If memory serves, the last proposal looked
more like UPDATE ... SET, that is

  INSERT INTO TableX SET i = a, j = b, k = c FROM TableY;

The general consensus though seems to be that we don't want to get
out front of the SQL standards committee on something like this.
If we do, for sure they'll standardize some other way to do
the same thing :-(

			regards, tom lane






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], [email protected]
  Subject: Re: INSERT ... SELECT nonpositional syntax
  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