Skip to content
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

support --value/--argument param for use with --execute #334

Open
nomicode opened this issue Aug 10, 2020 · 1 comment
Open

support --value/--argument param for use with --execute #334

nomicode opened this issue Aug 10, 2020 · 1 comment

Comments

@nomicode
Copy link
Contributor

nomicode commented Aug 10, 2020

at the moment, there is no way to safely interpolate values into SQL that is passed into crash on the command-line for execution. the only way to do it is via shell string interpolation

it would be good if crash supported something like --variable=assignment ala the psql client (cf. https://www.postgresql.org/docs/9.5/app-psql.html)

at the moment, I have to warn users not to attempt something like this in production, even though it's handy for use in tutorials. see the WARNING note here: https://crate.io/docs/crate/tutorials/en/latest/generate-time-series/cli.html#record-the-iss-position

@autophagy
Copy link
Contributor

I think this'd be a nice idea, we could also support the \set syntax like psql does during an interactive session for a similar purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants