-a vs -e option of vsql
Moderator: NorbertKrupa
-a vs -e option of vsql
Can someone explain to me what is the difference between the -a (Echo all input from script) and -e (Echo commands sent to server) command line options of vsql? They seem to do the same exact thing!
- JimKnicely
- Site Admin
- Posts: 1825
- Joined: Sat Jan 21, 2012 4:58 am
- Contact:
Re: -a vs -e option of vsql
Hi,
The -e (just SQL statements) produces a subset of the -a (everything) option.
I put some examples below where each example uses the following sql script file as input:
-a Example:
-e Example:
See how the -a option will echo every line in the sql script whereas the -e option only echo's the SQL command?
The -e (just SQL statements) produces a subset of the -a (everything) option.
I put some examples below where each example uses the following sql script file as input:
Code: Select all
[dbadmin@vertica01 ~]$ cat /home/dbadmin/test.sql
-- Do some stuff
\set table_name dual
select * from :table_name;
Code: Select all
[dbadmin@vertica01 ~]$ vsql -a -f /home/dbadmin/test.sql
-- Do some stuff
\set table_name dual
select * from :table_name;
dummy
-------
X
(1 row)
Code: Select all
[dbadmin@vertica01 ~]$ vsql -e -f /home/dbadmin/test.sql
select * from dual;
dummy
-------
X
(1 row)
Jim Knicely
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.
Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.