From: | Limin Liu <limin(at)pumpkinnet(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org |
Cc: | limin(at)pumpkinnet(dot)com |
Subject: | extra syntax on INSERT |
Date: | 2001-05-31 20:24:12 |
Message-ID: | 3B16A86C.EC14A048@pumpkinnet.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
I just realized that INSERT allows us to have more syntax than the
manual said. I wonder if we want to elimiate it or keep it with more
documentation on the INSERT statment?
Here is the INSERT synopsis we have in 7.2 documentation.
==========
INSERT INTO table [ ( column [, ...] ) ]
{ DEFAULT VALUES | VALUES ( expression [, ...] ) | SELECT query }
Assume we have,
CREATE TABLE t1 (a1 int, a2 int);
CREATE TABLE t2 (a3 int, a4 int);
INSERT INTO t2 VALUES(2, 0);
INSERT INTO t2 VALUES(2,1);
==== postgres allows to have something like ====
INSERT INTO t1 VALUES(1, 0 AS "Oops");
INSRET INTO t1 VALUES(t2.*);
===================
For the first one, I believe that is due to reusing the definition of
target_list/target_el. I didn't dig in to see how PostgreSQL handle the
second case. At least the INSRET synopsis does not cover this case.
--
Regards,
LM Liu
From | Date | Subject | |
---|---|---|---|
Next Message | Lamar Owen | 2001-05-31 20:26:36 | Re: Compiling to RPM setup/filesystem layout |
Previous Message | Steve Wolfe | 2001-05-31 20:22:47 | Re: Compiling to RPM setup/filesystem layout |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-05-31 21:05:24 | Re: Access statistics |
Previous Message | Karel Zak | 2001-05-31 20:23:26 | Re: Cache for query plans |