Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Use postgres function as second argument to set #49
I want to construct the following query:
UPDATE users SET password = crypt('my super awesome password', gen_salt('md5'))
and it is not obvious how I have to go in order to not have the crypt function to get interpreted as a string value. I do not want to use the
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Yep, you can use a custom value type. Just represent the
Nope, doesn't work for me:
What I need is an unquoted raw value. I think this absolutely must be a part of the library; pretty much every app requires access to
@hiddentao By ‘works fine’, do you mean it produces this?
Anyways, obviously toString isn't the primary use case, and I cannot see how it can possibly work with toParam, given that you give all the output strings to the native driver as values.