Re: Issue with psqlrc with command line.

2018-08-30 Thread saurabh shelar
Hi David, Got your point. Thank you for the help. On Wed, Aug 29, 2018 at 9:07 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Wed, Aug 29, 2018 at 8:31 AM, saurabh shelar > wrote: > >> Hi David, >> >> Thank you for the help. >> >> I was just got confused with the below line men

Re: Issue with psqlrc with command line.

2018-08-29 Thread David G. Johnston
On Wed, Aug 29, 2018 at 8:31 AM, saurabh shelar wrote: > Hi David, > > Thank you for the help. > > I was just got confused with the below line mentioned in the document. > However, it seems it is still the same behaviour *(i.e --no-psqlrc)*. > > *"Before PostgreSQL 9.6, the -c option implied -X (

Re: Issue with psqlrc with command line.

2018-08-29 Thread saurabh shelar
Hi David, Thank you for the help. I was just got confused with the below line mentioned in the document. However, it seems it is still the same behaviour *(i.e --no-psqlrc)*. *"Before PostgreSQL 9.6, the -c option implied -X (--no-psqlrc); this is no longer the case."* On Wed, Aug 29, 2018 at 8

Re: Issue with psqlrc with command line.

2018-08-29 Thread David G. Johnston
On Wednesday, August 29, 2018, saurabh shelar wrote: > Hi David, > > Thank you for the swift response. > > However, could you please confirm if the below scenario is expected. > > - included the alias in the file. > - And passed the file with psql and it worked. > > *-bash-4.2$ cat test * > *:tes

Re: Issue with psqlrc with command line.

2018-08-29 Thread saurabh shelar
Hi David, Thank you for the swift response. However, could you please confirm if the below scenario is expected. - included the alias in the file. - And passed the file with psql and it worked. *-bash-4.2$ cat test * *:testing* *-bash-4.2$ /opt/PostgreSQL/9.6/bin/psql -f test * * id * ** *

Re: Issue with psqlrc with command line.

2018-08-29 Thread David G. Johnston
On Wednesday, August 29, 2018, saurabh shelar wrote: > > As per the document from PG-9.6 it is possible. > You cannot use psql variables with -c “ command must be either a command string that is completely parsable by the server (i.e., it contains no psql-specific features), or a single backslas

Issue with psqlrc with command line.

2018-08-29 Thread saurabh shelar
Hi All, I am facing issue while executing psqlrc alias commands via. "psql -c" option. Please find below details: -bash-4.2$ cat .psqlrc \set testing 'select * from test;' postgres=# select version(); version