Re: SQL-standard function body

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: SQL-standard function body
Дата
Msg-id CAFj8pRC72Qrd+SeWYypkXMCAbR=2CRu3xczD=oUdhJV0JiDT4g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: SQL-standard function body  (Vik Fearing <vik@postgresfriends.org>)
Список pgsql-hackers


st 1. 7. 2020 v 22:54 odesílatel Vik Fearing <vik@postgresfriends.org> napsal:
On 7/1/20 10:34 PM, Pavel Stehule wrote:
> st 1. 7. 2020 v 22:31 odesílatel Vik Fearing <vik@postgresfriends.org>
> napsal:
>
>> On 7/1/20 9:32 PM, Pavel Stehule wrote:
>>> st 1. 7. 2020 v 20:19 odesílatel Vik Fearing <vik@postgresfriends.org>
>>> napsal:
>>>
>>>> On 7/1/20 3:36 PM, Robert Haas wrote:
>>>>> I actually don't have a very clear idea of what the standard has to
>>>>> say about SQL-language functions. Does it just say it's a list of
>>>>> statements, or does it involve variables and control-flow constructs
>>>>> and stuff like that, too?
>>>>
>>>>
>>>> It's either a single sql statement, or a collection of them between
>>>> "begin atomic" and "end".  There are no variables or flow control
>>>> constructs or anything like that, just as there are no such things
>>>> outside of a function.
>>>>
>>>
>>> What is the source of this comment?
>>
>>
>> The SQL Standard.
>>
>
> The SQL Standard is really big, and is very possible so I miss this part.
> Can you send me a link?


ISO/IEC 9075-2:2016 Section 11.60 <SQL-invoked routine>

I am looking there, and it looks like a subset of SQL/PSM or better - SQL/PSM is extending this. But this part is a little bit strange, because it doesn't introduce its own variables, but it is working with the concept of host variables and is a little bit messy (for me). Looks like it is introduced for usage in triggers. If we support triggers without trigger functions, then it has sense. Without it - It is hard for me to imagine a use case for this reduced language.

Regards

Pavel



--
Vik Fearing

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Cleanup - adjust the code crossing 80-column window limit
Следующее
От: James Sewell
Дата:
Сообщение: Re: Threading in BGWorkers (!)