On Παρ 31 Αυγ 2012 09:37:05 Craig Ringer wrote:
> On 08/30/2012 02:42 PM, Achilleas Mantzios wrote:
> > I have found useful the use of variable assignment in psql, e.g.
>
> If you're going to to that, why not drive psql as a coprocess:
because it is completely irrelevant with what the OP asked fo
On Î Î±Ï 31 ÎÏ
γ 2012 09:19:26 Chris Angelico wrote:
> On Thu, Aug 30, 2012 at 4:42 PM, Achilleas Mantzios
> wrote:
> > I have found useful the use of variable assignment in psql, e.g.
> >
> > #!/bin/sh
> >
> > # lets say you have some var with a value, or even populate some var with a
> > val
On Παρ 31 Αυγ 2012 09:37:05 Craig Ringer wrote:
> On 08/30/2012 02:42 PM, Achilleas Mantzios wrote:
> > I have found useful the use of variable assignment in psql, e.g.
>
> If you're going to to that, why not drive psql as a coprocess:
because it is completely irrelevant with what the OP asked fo
On Î Î±Ï 31 ÎÏ
γ 2012 09:19:26 Chris Angelico wrote:
> On Thu, Aug 30, 2012 at 4:42 PM, Achilleas Mantzios
> wrote:
> > I have found useful the use of variable assignment in psql, e.g.
> >
> > #!/bin/sh
> >
> > # lets say you have some var with a value, or even populate some var with a
> > val
On 08/30/2012 02:42 PM, Achilleas Mantzios wrote:
I have found useful the use of variable assignment in psql, e.g.
If you're going to to that, why not drive psql as a coprocess:
http://stackoverflow.com/a/8305578/398670
or if at all possible, use a language with sane PostgreSQL bindings.
On 08/30/2012 04:19 PM, Chris Angelico wrote:
On Thu, Aug 30, 2012 at 4:42 PM, Achilleas Mantzios
wrote:
I have found useful the use of variable assignment in psql, e.g.
#!/bin/sh
# lets say you have some var with a value, or even populate some var with a
value from
# psql as shown below
som
On Thu, Aug 30, 2012 at 4:42 PM, Achilleas Mantzios
wrote:
> I have found useful the use of variable assignment in psql, e.g.
>
> #!/bin/sh
>
> # lets say you have some var with a value, or even populate some var with a
> value from
> # psql as shown below
> somevar=`psql -P pager=off -q -t -c "S
ittle, Douglas wrote:
> Thanks
>
>
> -Original Message-
> From: Ryan Kelly [mailto:rpkell...@gmail.com]
> Sent: Wednesday, August 29, 2012 12:41 PM
> To: Little, Douglas
> Cc: PostgreSQL General (pgsql-general@postgresql.org)
> Subject: Re: [GENERAL] psql & unix env va
Thanks
-Original Message-
From: Ryan Kelly [mailto:rpkell...@gmail.com]
Sent: Wednesday, August 29, 2012 12:41 PM
To: Little, Douglas
Cc: PostgreSQL General (pgsql-general@postgresql.org)
Subject: Re: [GENERAL] psql & unix env variables
On Wed, Aug 29, 2012 at 12:35:32PM -0500, Li
On Wed, Aug 29, 2012 at 12:35:32PM -0500, Little, Douglas wrote:
> Is there a method for having unix env variables incorporated into a psql sql
> statement?
> Ie
> Export var='dev'
> Psql =c 'select count(*) from $var.customer;'
export FOO="bar"
psql -c "select count(*) from $FOO.customer;"
Note
On Wednesday, August 29, 2012 12:35:32 PM Little, Douglas wrote:
> Is there a method for having unix env variables incorporated into a psql sql
> statement? Ie
> Export var='dev'
> Psql =c 'select count(*) from $var.customer;'
>
Use double-quotes, not single-quotes. Bash won't interpolate variabl
Is there a method for having unix env variables incorporated into a psql sql
statement?
Ie
Export var='dev'
Psql =c 'select count(*) from $var.customer;'
Doug Little
Sr. Data Warehouse Architect | Business Intelligence Architecture | Orbitz
Worldwide
500 W. Madison, Suite 1000 Chicago IL 606
12 matches
Mail list logo