Re: Query returns error "there is no parameter $1" but server logs that there are two parameters supplied

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Query returns error "there is no parameter $1" but server logs that there are two parameters supplied
Дата
Msg-id 4011573.1689601526@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Query returns error "there is no parameter $1" but server logs that there are two parameters supplied  (Paul De Audney <paul.deaudney@safetyculture.io>)
Ответы Re: Query returns error "there is no parameter $1" but server logs that there are two parameters supplied  (Paul De Audney <paul.deaudney@safetyculture.io>)
Список pgsql-bugs
Paul De Audney <paul.deaudney@safetyculture.io> writes:
> 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)

"character 24" is not anywhere near where the $1 symbol is in that
query string, so I'm betting that this error does not refer to the
outer client-submitted query but to some plpgsql or sql function that
is getting invoked along the way.  Since you've provided exactly no
context for this log snippet, it's hard to speculate further than
that.

(And yeah, if that is how such a problem gets logged then I agree
we could stand to work on providing better error context.  But again,
without a reproducible test case it's hard to make any progress.)

            regards, tom lane



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

Предыдущее
От: "suyu.cmj"
Дата:
Сообщение: Re: The same 2PC data maybe recovered twice
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18026: compile error / fe-auth.c:807:64: error: 'CHAR_BIT' undeclared (first use in this function)