pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: paul.deaudney@safetyculture.com
To: pgsql-bugs@lists.postgresql.org
Subject: Re: Query returns error "there is no parameter $1" but server logs that there are two parameters supplied
Date: Mon, 17 Jul 2023 09:58:00 +0200
Message-ID: <96b08d4083eb2a5fd39f7b71d34f963aefcabf3c.camel@cybertec.at> (raw)
In-Reply-To: <CACKYwcL_dBUemZ4ksa608cGo4+yf6ca6t3pF1YyFN36+VpqD4w@mail.gmail.com>
References: <CACKYwcL_dBUemZ4ksa608cGo4+yf6ca6t3pF1YyFN36+VpqD4w@mail.gmail.com>

On Mon, 2023-07-17 at 12:25 +1000, Paul De Audney wrote:

> We have other queries logging the same error on a different database on the same server infrastructure using golang based connection pools/drivers (jackc/pgx).
> 
> 2023-07-17 01:39:20.265 UTC [1857486] user@db_name ERROR:  there is no parameter $1 at character 24
> 2023-07-17 01:39:20.265 UTC [1857486] user@db_name CONTEXT:  unnamed portal with parameters: $1 = 'template_31f98dcda25c482eb0b086a0081d28a8', $2 = 'template_31F98DCDA25C482EB0B086A0081D28A8'
> 2023-07-17 01:39:20.265 UTC [1857486] user@db_name STATEMENT:
>               SELECT templates.id, templates.rev, templates.json, meta.template_data as meta_template_data, meta.date_draft_modified, meta.draft_author_name
>               FROM templates
>                      LEFT JOIN templates_meta as meta
>                                ON templates.id = meta.id
>               WHERE (templates.id = $1 OR templates.id = $2)
> 
> This query does work when re-run exactly as shown there.

To determine if that is a bug in PostgreSQL or the PostgreSQL driver, please reproduce
the problem on a test system with "log_min_duration_statement = 0" and show all relevant
parts of the log file.

Yours,
Laurenz Albe





view thread (4+ messages)  latest in thread

Message-ID: <96b08d4083eb2a5fd39f7b71d34f963aefcabf3c.camel@cybertec.at>
Permalink:  ../96b08d4083eb2a5fd39f7b71d34f963aefcabf3c.camel@cybertec.at/
Also on:    postgresql.org/message-id/96b08d4083eb2a5fd39f7b71d34f963aefcabf3c.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: laurenz.albe@cybertec.at, paul.deaudney@safetyculture.com, pgsql-bugs@lists.postgresql.org
  Subject: Re: Query returns error "there is no parameter $1" but server logs that there are two parameters supplied
  In-Reply-To: <96b08d4083eb2a5fd39f7b71d34f963aefcabf3c.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox