New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function Calls That Require Single Quoted Parameters Doesn't Work #309
Comments
I don't know if this is a bug or not (doesn't look like one to me) but I believe that there is a way to get this to work. First off if I understand the documentation correctly the column name should be quoted as a string literal so you shouldn't use For the table name you are using you also don't need
In case you need to quote the table name or use a schema you could try the below:
Note the single quotes around |
If the value is safe (e.g. comes from predefined list of values), then you can just use |
Duplicate of #150 |
🎉 This issue has been resolved in version 24.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
You can now use |
@muratgozel strange it did work for me or at least I thought it did.. I didn’t get an error but I tested it without |
The postgres internal function
pg_get_serial_sequence(table_name, col_name)
is a bit sensitive with quoting. Bothtable_name
andcol_name
should be sent single-quoted. The following query works when executed from the psql:There is no way to achieve this in slonik.
Case:
Expected Behavior
The
result
should return{rows: [{new_id: 1}]}
Current Behavior
It raises an error:
The query object:
The text was updated successfully, but these errors were encountered: