crash icon indicating copy to clipboard operation
crash copied to clipboard

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

Open nomicode opened this issue 5 years ago • 1 comments

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

nomicode avatar Aug 10 '20 13:08 nomicode

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.

autophagy avatar Sep 08 '20 12:09 autophagy