Set variable to value containing a space
Posted: Mon Feb 23, 2015 2:35 pm
Hi all,
How can I set a variable equal to a value that contains a space?
If I do it the following the strings data1 and data2 are concatenated:
If I use quotes, I get the space, but I also get the quotes:
I don't want the quotes!
Thank you
How can I set a variable equal to a value that contains a space?
If I do it the following the strings data1 and data2 are concatenated:
Code: Select all
dbadmin=> \set myvar data1 data2
dbadmin=> \echo :myvar
data1data2
Code: Select all
dbadmin=> \set myvar "data1 data2"
dbadmin=> \echo :myvar
"data1 data2"
Thank you