Re: table functions
От | Tom Lane |
---|---|
Тема | Re: table functions |
Дата | |
Msg-id | 7701.1039446782@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | table functions (Eric B.Ridge <ebr@tcdi.com>) |
Ответы |
Re: table functions
|
Список | pgsql-general |
"Eric B.Ridge" <ebr@tcdi.com> writes: > Is it possible for me to get the FROM, WHERE, and AS ... clauses from > within my table function code? AS: yes, as Joe already mentioned. FROM/WHERE: No, and I think it would be quite inappropriate for the function's behavior to depend on any such info. To work correctly, you'd need to encode virtually a complete understanding of SQL into your function --- consider cases like outer joins or grouping that intervene between your function call and the FROM/WHERE clauses. And those are just the simpler cases. > Also, in psql, if I press ^C while a table function is executing, the > function doesn't actually stop, but psql does say "Cancel request > sent". What processes this request? How do I tell postgres that I > want to be notified too? You can throw a CHECK_FOR_INTERRUPTS(); into your main loop whereever it seems safe to be killed by an interrupt. regards, tom lane
В списке pgsql-general по дате отправления: