glaredb icon indicating copy to clipboard operation
glaredb copied to clipboard

Add SLTS for `~` paths

Open universalmind303 opened this issue 2 years ago • 0 comments

          @universalmind303 can we add SLTs? We can use the `HOME` environment variable or set the test variable using a `Hook`.
statement ok
COPY (SELECT 101) TO '${HOME}/data.csv';

query I
SELECT * FROM '~/data.csv';
----
101

This reminds me, this doesn't work with COPY .. TO ..:

> copy (select 1) to '~/Desktop/data.csv';
Error: External error: IO error: No such file or directory (os error 2)
> copy (select 1) to '/Users/vrongmeal/Desktop/data.csv';
Copy success

Originally posted by @vrongmeal in https://github.com/GlareDB/glaredb/issues/2036#issuecomment-1792768565

universalmind303 avatar Nov 03 '23 21:11 universalmind303