Re: failed to execute the psql case statement which has the function call. - Mailing list pgsql-admin

From David G. Johnston
Subject Re: failed to execute the psql case statement which has the function call.
Date
Msg-id CAKFQuwYugnug1o+zbdLv27pJQWZs+pHOwwvW5W6KsTONJz7pNA@mail.gmail.com
Whole thread Raw
In response to Re: failed to execute the psql case statement which has the function call.  (sagar jadhav <sagarjdhv5@gmail.com>)
Responses Re: failed to execute the psql case statement which has the function call.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
On Tue, Apr 5, 2022 at 6:47 AM sagar jadhav <sagarjdhv5@gmail.com> wrote:
Use single quotes ('attribute') for variable in function.

That just produces the literal variable - it doesn't cause a substitution of the variable's value into the query.  And if the position of usage does need a column identifier it still will produce a syntax error.

But the error fragment shown suggests that the query shouldn't be expecting a column name (contrary to my earlier point), so we are back to having to see the entire function definition (or a reproducible example) to provide an answer.  Spelling typo comes to mind.

David J.

pgsql-admin by date:

Previous
From: sagar jadhav
Date:
Subject: Re: failed to execute the psql case statement which has the function call.
Next
From: Tom Lane
Date:
Subject: Re: failed to execute the psql case statement which has the function call.