Skip to content

Is it possible to pass postgres func like "now()" in args? #1722

Closed Answered by jackc
a1tus asked this question in Q&A
Discussion options

You must be logged in to vote

Your first example is not possible. At the PostgreSQL protocol level a bound parameter is a value not a SQL expression.

With pgxutil.UpdateRow it is not possible at the present. I've wanted that feature myself, but have not yet determined a good solution. Hopefully in the future.

Replies: 3 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by a1tus
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@a1tus
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants