Subject Re: [Firebird-Architect] Exec. statement parameters
Author Alex Peshkov
On Monday 10 December 2007 16:55, Dmitry Yemanov wrote:
> Adriano,
>
> > ----------
> > S = 'INSERT INTO TTT VALUES (:a, :b, :a)';
> > EXECUTE STATEMENT (:S) (CURRENT_TRANSACTION, CURRENT_CONNECTION)
> > ----------
> >
> > Three parameters, two names, and two values...
> >
> > I'm against this syntax.
>
> Are you also against the idea to implement named parameters in DSQL?
> It's the thing we've been asked for since FB1, I suppose. Yes, it means
> an API change/extension, but it does sound as a valuable feature to me.
> And, if we're going to support both question mark based unnamed and
> colon based named parameters in the future, what's wrong to have them in
> PSQL earlier?

Named parameters is good feature, but what about the syntax in the sample, O
also do not like it. If we use named parameters, it should be something like:

S = 'INSERT INTO TTT VALUES (:a, :b, :a)';
EXECUTE STATEMENT S (a=CURRENT_TRANSACTION, b=CURRENT_CONNECTION);