Re: How to pass a parameter in a query to postgreSQL 11 (offtopic) - Mailing list pgsql-hackers

From Justin Pryzby
Subject Re: How to pass a parameter in a query to postgreSQL 11 (offtopic)
Date
Msg-id 20210609145207.GX16435@telsasoft.com
Whole thread Raw
In response to How to pass a parameter in a query to postgreSQL 11  (Hassan Camacho Cadre <hccadre@gmail.com>)
List 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 by date:

Previous
From: David Christensen
Date:
Subject: Re: DELETE CASCADE
Next
From: Tom Lane
Date:
Subject: Re: logical replication of truncate command with trigger causes Assert