Re: ecpg rejects input parameters - Mailing list pgsql-general

From Tom Lane
Subject Re: ecpg rejects input parameters
Date
Msg-id 15056.1428526382@sss.pgh.pa.us
Whole thread Raw
In response to Re: ecpg rejects input parameters  (Andrew Pennebaker <andrew.pennebaker@gmail.com>)
Responses Re: ecpg rejects input parameters  (Andrew Pennebaker <andrew.pennebaker@gmail.com>)
List pgsql-general
Andrew Pennebaker <andrew.pennebaker@gmail.com> writes:
> I can't find a relevant section to address my specific problem: ecpg
> complaining when I try to check the syntax of my .sql files that use input
> parameters.

I'm not sure why you think that should work.  psql and ecpg have quite
distinct input languages.  Both are extensions of SQL, but the key word
there is "extension".  ecpg certainly isn't going to accept psql's
backslash commands for instance, any more than psql would accept ecpg's
C code portions.  And I doubt it would be useful for ecpg to simply ignore
the variable-interpolation symbols; but it has no way to know what's going
to be substituted for those symbols.

It would be more interesting to consider giving psql a syntax-check-only
mode; though I'm afraid use of variable interpolation would still be pretty
problematic, since the variables are commonly filled from execution of
previous commands.

            regards, tom lane


pgsql-general by date:

Previous
From: Andrew Pennebaker
Date:
Subject: Re: ecpg rejects input parameters
Next
From: Adrian Klaver
Date:
Subject: Re: ecpg rejects input parameters