Re: How to pass a parameter in a query to postgreSQL 11 (offtopic)

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: How to pass a parameter in a query to postgreSQL 11 (offtopic)
Дата
Msg-id 20210609145207.GX16435@telsasoft.com
обсуждение исходный текст
Ответ на How to pass a parameter in a query to postgreSQL 11  (Hassan Camacho Cadre <hccadre@gmail.com>)
Список pgsql-hackers
On Wed, Jun 09, 2021 at 05:30:15AM -0500, Hassan Camacho Cadre wrote:
> I recently migrated from version 8.3 of postgreSQL to v11, previously in
> all my queries for passing parameters I used the character :
> Example
> Where id =: searched

I guess you migrated to a whole new environment, with many new package
versions, not just postgres ?

We don't know how you're issuing queries, but I'm guessing some other
application is what changed.

Postgres uses $1 for query parameters, in both v8.3 and in v11.
https://www.postgresql.org/docs/8.3/libpq-exec.html

BTW, this is the list for development of postgres itself.  It's much too busy
to also answer other questions.  Please raise the question on the -general
list, with information about your environment.
https://www.postgresql.org/list/

Thanks,
-- 
Justin

> In the new version when I try to make this query it sends me an error
> 
> ERROR syntax error at or near ":"
> 
> Could someone help me to know how I can configure the parameter passing
> character or, failing that, how I should pass the parameters in this new
> version.



В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Christensen
Дата:
Сообщение: Re: DELETE CASCADE
Следующее
От: Tom Lane
Дата:
Сообщение: Re: logical replication of truncate command with trigger causes Assert