|From:||Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>|
|Subject:||Re: ECPG: proposal for new DECLARE STATEMENT|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
On Thu, Oct 31, 2019 at 12:29:30PM +0000, kuroda(dot)hayato(at)fujitsu(dot)com wrote:
>As declared last month, I propose again the new ECPG grammar, DECLARE STATEMENT.
>This had been committed once, but it removed from PG12 because of
>In this mail, I want to report some problems that previous implementation has,
>produce a new solution, and attach a WIP patch.
>[Basic function, Grammar, and Use case]
>This statement will be used for the purpose of designating a connection easily.
>Please see below:
>The Oracle's manual will also help your understanding:
>That's why this feature has been reverted.
>1. The namespace of the identifier was not clear. If you use a same identifier for other SQL statements,
> these interfered each other and statements might be executed at the unexpected connection.
>2. Declaring at the outside of functions was not allowed. This specification is quite different from the other
> declarative statements, so some users might be confused.
> For instance, the following example was rejected.
>EXEC SQL DECLARE stmt STATEMENT;
> EXEC SQL DECLARE cur CURSOR FOR stmt;
>3. These specifications were not compatible with other DBMSs.
>The namespace is set to be a file unit. This follows other DBMSs.
>When the DECLARE SATATEMENT statement is read, the name, identifier
>and the related connection are recorded.
>And if you use the declared identifier in order to prepare or declare cursor,
>the fourth argument for ECPGdo(it represents the connection) will be overwritten.
>This declaration is enabled only the precompile phase.
>The declaration must be appeared before using it.
>This also follows Pro*C precompiler.
>A WIP patch is attached. Confirm that all ECPG tests have passed,
>however, some documents are not included.
>They will be added later.
>I applied the pgindent as a test, but it might be failed because this is the
>first time for me.
I see there were no reviews of this new patch, with the feature
reimplemented after it was reverted from PG12 in September :-(
I'm not an ecpg expert (in fact I've never even used it), so my review
is pretty superficial, but I only found a couple of minor whitespace
issues (adding/removing a line/tab) - see the attached file.
Kuroda-san, you mentioned the patch is WIP. What other bits you think
are missing / need improvement? I see you mentioned some documentation
is missing - I suppose that's one of the missing pieces?
For the record, there were two threads discussing the implementation 
and then the revert .
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
|Next Message||John Naylor||2020-01-12 02:53:24||Re: [proposal] de-TOAST'ing using a iterator|
|Previous Message||Amit Kapila||2020-01-12 02:48:08||Re: logical decoding : exceeded maxAllocatedDescs for .spill files|