Re: Command Triggers, patch v11
От | Dimitri Fontaine |
---|---|
Тема | Re: Command Triggers, patch v11 |
Дата | |
Msg-id | m2ty1loha4.fsf@2ndQuadrant.fr обсуждение исходный текст |
Ответ на | Re: Command Triggers, patch v11 (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Command Triggers, patch v11
|
Список | pgsql-hackers |
Tom Lane <tgl@sss.pgh.pa.us> writes: > 1. ExecuteQuery still has to know that's a CREATE TABLE AS operation so > that it can enforce that the prepared query is a SELECT. (BTW, maybe > this should be weakened to "something that returns tuples", in view of > RETURNING?) That lights a bulb: what about rewriting CREATE TABLE AS as two commands, internally: 1. CREATE TABLE …2. WITH x ( <query here> ) INSERT INTO … SELECT * FROM x; It seems like not solving much from a practical point of view though as you need to be able to parse the output of the subquery before you can do the first step, but on the other hand it might be that you already have the pieces to just do that. Well, I had to share that though, somehow. Regards, -- Dimitri Fontaine http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support
В списке pgsql-hackers по дате отправления: