extra syntax on INSERT
| От | Limin Liu |
|---|---|
| Тема | extra syntax on INSERT |
| Дата | |
| Msg-id | 3B16A86C.EC14A048@pumpkinnet.com обсуждение исходный текст |
| Ответы |
Re: extra syntax on INSERT
|
| Список | 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
В списке pgsql-hackers по дате отправления: