Re: Is this a bug or a feature?
От | Tom Lane |
---|---|
Тема | Re: Is this a bug or a feature? |
Дата | |
Msg-id | 7272.971925277@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Is this a bug or a feature? ("Kevin O'Gorman" <kogorman@pacbell.net>) |
Список | pgsql-general |
"Kevin O'Gorman" <kogorman@pacbell.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
В списке pgsql-general по дате отправления: