TODO : Multiple inserts in a single statement

Started by Nick Barrover 22 years ago4 messagespatches
Jump to latest
#1Nick Barr
nicky@chuckie.co.uk

Hi,

Would anyone have any objections if I started to look at the following
TODO item?

INSERT

* Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)

By this item I assume it means extending the INSERT INTO statement to
allow for multiple inserts in a single statement. Any further
information on this item would be greatly appreciated.

Nick

#2Bruce Momjian
bruce@momjian.us
In reply to: Nick Barr (#1)
Re: TODO : Multiple inserts in a single statement

Nick Barr wrote:

Hi,

Would anyone have any objections if I started to look at the following
TODO item?

INSERT

* Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)

By this item I assume it means extending the INSERT INTO statement to
allow for multiple inserts in a single statement. Any further
information on this item would be greatly appreciated.

Sounds good. Please read the developers FAQ for the suggested process.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#2)
Re: TODO : Multiple inserts in a single statement

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Nick Barr wrote:

Would anyone have any objections if I started to look at the following
TODO item?

* Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)

Sounds good. Please read the developers FAQ for the suggested process.

Also please read the SQL spec. I recall having looked at this once
with the idea that it should be an easy Sunday-afternoon hack, and
discovering that making it do what the spec envisions was harder than
I thought. I forget now just what the issues were, but I remember
there's more there than meets the eye. (Type coercion might have been
part of it ... don't recall for sure ...)

regards, tom lane

#4Nick Barr
nicky@chuckie.co.uk
In reply to: Tom Lane (#3)
Re: TODO : Multiple inserts in a single statement

Tom Lane wrote:

Bruce Momjian <pgman@candle.pha.pa.us> writes:

Nick Barr wrote:

Would anyone have any objections if I started to look at the following
TODO item?

* Allow INSERT INTO tab (col1, ..) VALUES (val1, ..), (val2, ..)

Sounds good. Please read the developers FAQ for the suggested process.

Also please read the SQL spec. I recall having looked at this once
with the idea that it should be an easy Sunday-afternoon hack, and
discovering that making it do what the spec envisions was harder than
I thought. I forget now just what the issues were, but I remember
there's more there than meets the eye. (Type coercion might have been
part of it ... don't recall for sure ...)

regards, tom lane

Cheers guys. Reading every piece of documentation I can find (isn't
Google marvellous). Will report back when I have looked at the code a
bit more.

Nick