Re: Getting error 42P02, despite query parameter being sent

2024-11-17 Thread Achilleas Mantzios
Στις 16/11/24 18:09, ο/η Adrian Klaver έγραψε: On 11/16/24 03:15, Achilleas Mantzios wrote: Στις 16/11/24 12:55, ο/η Max Ulidtko έγραψε: Greetings, group! I'm trying to understand a low-level issue. Am evaluating a new client library for Postgres; it's not particularly popular / mainstrea

Re: Getting error 42P02, despite query parameter being sent

2024-11-17 Thread Adrian Klaver
On 11/17/24 11:44, Achilleas Mantzios wrote: Στις 16/11/24 18:09, ο/η Adrian Klaver έγραψε: On 11/16/24 03:15, Achilleas Mantzios wrote: Στις 16/11/24 12:55, ο/η Max Ulidtko έγραψε: Greetings, group! I'm trying to understand a low-level issue. Am evaluating a new client library for Postgre

Re: Getting error 42P02, despite query parameter being sent

2024-11-17 Thread David G. Johnston
On Sun, Nov 17, 2024 at 3:10 AM Max Ulidtko wrote: > I assumed that $1 would get substituted *at query time* > The "select" portion of a "create view" query does not get executed during processing of "create view" and it is the "select" execution part of the executor code that performs parameter

Re: Getting error 42P02, despite query parameter being sent

2024-11-17 Thread Adrian Klaver
On 11/17/24 02:09, Max Ulidtko wrote: Thanks for replies! I understand now. Just to clarify user-side motivation: I'm taught that concatenating data into SQL query strings is bad practice and should be avoided. I know how to do it safely in my particular case; but apparently the author of this

Re: Getting error 42P02, despite query parameter being sent

2024-11-17 Thread Max Ulidtko
Thanks for replies! I understand now. Just to clarify user-side motivation: I'm taught that concatenating data into SQL query strings is bad practice and should be avoided. I know how to do it safely in my particular case; but apparently the author of this client library was taught the same, a

Re: Getting error 42P02, despite query parameter being sent

2024-11-16 Thread Tom Lane
Achilleas Mantzios writes: > Στις 16/11/24 12:55, ο/η Max Ulidtko έγραψε: >> The issue I'm hitting with it is exemplified by server logs like this: >> >> 2024-11-16 10:28:19.928 UTC [46] LOG: execute : CREATE VIEW >> public.foobar (alg, hash) AS VALUES ('md5', $1); >> 2024-11-16 10:28:19.928 UTC

Re: Getting error 42P02, despite query parameter being sent

2024-11-16 Thread Adrian Klaver
On 11/16/24 03:15, Achilleas Mantzios wrote: Στις 16/11/24 12:55, ο/η Max Ulidtko έγραψε: Greetings, group! I'm trying to understand a low-level issue. Am evaluating a new client library for Postgres; it's not particularly popular / mainstream, and as I've understood so far, sports an indepe

Re: Getting error 42P02, despite query parameter being sent

2024-11-16 Thread Achilleas Mantzios
Στις 16/11/24 12:55, ο/η Max Ulidtko έγραψε: Greetings, group! I'm trying to understand a low-level issue. Am evaluating a new client library for Postgres; it's not particularly popular / mainstream, and as I've understood so far, sports an independent implementation of PG binary protocol.

Getting error 42P02, despite query parameter being sent

2024-11-16 Thread Max Ulidtko
Greetings, group! I'm trying to understand a low-level issue. Am evaluating a new client library for Postgres; it's not particularly popular / mainstream, and as I've understood so far, sports an independent implementation of PG binary protocol. The issue I'm hitting with it is exemplified b