From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | kogorman(at)pacbell(dot)net |
Cc: | PostgreSQL General List <pgsql-general(at)hub(dot)org> |
Subject: | Re: Is this a bug or a feature? |
Date: | 2000-10-19 03:14:37 |
Message-ID: | 7272.971925277@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
"Kevin O'Gorman" <kogorman(at)pacbell(dot)net> writes:
> But I cannot seem to get two selects in the same rule.
> So the question becomes: is this a bug or a feature?
The writer of the grammar seemed to think it was a feature, because
the productions for CREATE RULE go out of their way to prevent it.
I do not see any value in multiple SELECTs per se --- what are you
expecting will happen with the results of the additional SELECTs?
It does seem like some action queries with a SELECT as the tail end
would make perfect sense, although the grammar currently disallows
that.
I also do not see that it makes sense to allow a SELECT in a rule
that is for a non-SELECT event condition, though your examples show
that the system fails to enforce that. The average client app would
not be prepared to see results coming back from a non-SELECT query,
so I think allowing this is not a good thing.
Finally, it'd probably be a good thing to implement semantic
restrictions like these in post-processing, not in grammar rules,
so that a message more meaningful than "parse error near ;" can
be reported.
Feel free to propose and implement a more consistent behavior...
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2000-10-19 03:15:51 | Open Source Database Summit |
Previous Message | Tom Lane | 2000-10-19 02:50:43 | Re: rules *very* slow? |