Re: SQL statement PREPARE does not work in ECPG

From: Michael Meskes <meskes(at)postgresql(dot)org>
To: "Matsumura, Ryo" <matsumura(dot)ryo(at)jp(dot)fujitsu(dot)com>, "Takahashi, Ryohei" <r(dot)takahashi_2(at)jp(dot)fujitsu(dot)com>, "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SQL statement PREPARE does not work in ECPG
Date: 2019-03-01 10:10:45
Message-ID: ec26bdaacee70b06e23a5402aa438365ca9eb045.camel@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Matsumura-san,

> But I will probably be late because I don't understand parse.pl very
> well.
> I think that the following rule is made by parse.pl.
>
> PreparableStmt:
> SelectStmt
> {
> is_in_preparable_stmt = true; <--- I want to add it.
> $$ = $1;
> }
> | InsertStmt
> .....

The only way to add this is by creating a replacement production for
this rule. parse.pl cannot do it itself.

> I will use @1 instend of $$1 because the replacing is almost same as
> the existing replacing function in ecpglib.
> Is it good?

I'd say so.

Thanks.

Michael
--
Michael Meskes
Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
Meskes at (Debian|Postgresql) dot Org
Jabber: michael at xmpp dot meskes dot org
VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2019-03-01 10:17:27 Re: Refactoring the checkpointer's fsync request queue
Previous Message Martín Marqués 2019-03-01 09:45:56 Re: Add exclusive backup deprecation notes to documentation