Re: proposal: plpgsql pragma statement

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: proposal: plpgsql pragma statement
Дата
Msg-id CAFj8pRASzjzYFUq-9kNzmotrjWJ1hVP+FncH-iD9cHtP6DVhVg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: proposal: plpgsql pragma statement  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: plpgsql pragma statement  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers


čt 6. 12. 2018 v 18:27 odesílatel Pavel Stehule <pavel.stehule@gmail.com> napsal:


čt 6. 12. 2018 v 18:17 odesílatel Robert Haas <robertmhaas@gmail.com> napsal:
On Thu, Dec 6, 2018 at 12:13 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
> My idea about plpgsql PRAGMA is very close to PL/SQL or Ada PRAGMA. This is not runtime statement - the information from this command will be assigned to related object - function, block, command at parser time.

That's sensible, but the syntax you were proposing didn't look like it
was related to a specific statement.  I was objecting to the idea that
PRAGMA whatever; should be construed as an annotation of,
specifically, the following statement.

please, can you propose, some what you like?

For my purpose I can imagine PRAGMA on function level with same syntax like PL/SQL - I need to push somewhere some information that I can use for plpgsql_check to protect users against false alarms. The locality in this moment is not too important for me. But I prefer solution that doesn't looks too strange, and is possible just with change plpgsql parser.

I looked to some documentation - and for example - the PL/SQL PRAGMA inline looks very similar to what I propose.

For me good enough is block level pragma used in DECLARE section

DECLARE
  pragma plpgsql_check(OFF);
BEGIN
  .. this part will not be checked ..
END;

The syntax will be prepared for future PL/SQL pragmas like AUTONOMOUS_TRANSACTION, ..

Regards

Pavel 

Regards

Pavel


--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Richard Guo
Дата:
Сообщение: Fast path for empty relids in check_outerjoin_delay()
Следующее
От: Simon Riggs
Дата:
Сообщение: Re: Making WAL receiver startup rely on GUC context forprimary_conninfo and primary_slot_name