Re: ecpg rejects input parameters
| От | Adrian Klaver |
|---|---|
| Тема | Re: ecpg rejects input parameters |
| Дата | |
| Msg-id | 55253C80.7040909@aklaver.com обсуждение исходный текст |
| Ответ на | ecpg rejects input parameters (Andrew Pennebaker <andrew.pennebaker@gmail.com>) |
| Ответы |
Re: ecpg rejects input parameters
|
| Список | pgsql-general |
On 04/08/2015 07:22 AM, Andrew Pennebaker wrote: > PostgreSQL uses a :colon syntax for parameterizing SQL commands with > command line variables. > > create-database.sql: > > CREATE DATABASE :db; > > Usage: > > $ psql -f create-database.sql -v db=test > > However, pgsanity/ecpg rejects these. > > $ pgsanity create-database.sql > line 1: ERROR: syntax error at or near ":db" > > Is there a flag I can give to ecpg to ignore input parameters? > > Is there a patch we could make to ecpg to accept input parameters? > > Is there another way to write my input parameters to work around this error? If I am following correctly: http://www.postgresql.org/docs/9.4/interactive/ecpg-variables.html > > -- > Cheers, > > Andrew Pennebaker > www.yellosoft.us <http://www.yellosoft.us> -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: