Re: proposal: plpgsql pragma statement - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: proposal: plpgsql pragma statement
Date
Msg-id CAFj8pRDQUM=vvNLSUdwSUanbBvsFJQz3n82ZZBFss=Cce1z8Sg@mail.gmail.com
Whole thread Raw
In response to Re: proposal: plpgsql pragma statement  (Pavel Luzanov <p.luzanov@postgrespro.ru>)
List pgsql-hackers


st 5. 12. 2018 v 15:03 odesílatel Pavel Luzanov <p.luzanov@postgrespro.ru> napsal:

But maybe your extension could read the PERFORM statement preceding it and treat it as an annotation hint for the following statement.

In this case, comment line in some format will be better than real PERFORM statement. Like this:


/*+PRAGMA cmdtype CREATE; */
EXECUTE format('CREATE TABLE xxx ...

I though about it, but it is significantly harder for implementation. Now, the content of comments are just ignored. If we push PRAGMA into comments, then we should to do some work with comments.

PRAGMA as statement is much more easy for implementation. But Using PRAGMA inside comments is very good alternative.

Regards

Pavel

 
 
-----
Pavel Luzanov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: plpgsql pragma statement
Next
From: Julien Demoor
Date:
Subject: Re: NOTIFY and pg_notify performance when deduplicating notifications