On Aug 2, 2006, at 12:47 , Joe Conway wrote:
regression=# create rule r2 as on update to src do insert into log
values(old.*, 'old'), (new.*, 'new');
ERROR: VALUES must not contain OLD or NEW references
Would it make sense to add a HINT as well, recommending the UNION
construct Tom mentio
Bruce Momjian wrote:
Should we wait for someone to actually ask for this before adding it
to the TODO list?
Probably worth adding it to the TODO list so it doen't get lost.
Does it cause a crash now?
Nope:
regression=# create table log(f1 int, f2 int, tag text);
CREATE TABLE
regression=# i
Should we wait for someone to actually ask for this before adding it to
the TODO list? Does it cause a crash now?
---
Tom Lane wrote:
> Joe Conway <[EMAIL PROTECTED]> writes:
> > Tom Lane wrote:
> >> What I'm inclined to do
Tom Lane wrote:
What I'm inclined to do for 8.2 is to disallow OLD/NEW references in
multi-element VALUES clauses; the feature is still tremendously useful
without that.
Given the timing, this sounds like a reasonable approach. I agree that
the feature has lots of interesting uses -- I'd hate
Tom Lane wrote:
Joe Conway <[EMAIL PROTECTED]> writes:
One of the things I'm struggling with is lack of column aliases. Would
it be reasonable to require something like this?
Requiring column aliases is counter to spec ...
SELECT ... FROM (VALUES ...) AS foo(col1 type1, col2 type2,
Tom Lane wrote:
If I'm reading the spec correctly, VALUES is exactly parallel to SELECT
in the grammar, which means that to use it in FROM you would need
parentheses and an alias:
SELECT ... FROM (SELECT ...) AS foo
SELECT ... FROM (VALUES ...) AS foo
One of the things I'm str