Re: Doing a \set through perl DBI ?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: David Gauthier <davegauthierpg(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Doing a \set through perl DBI ?
Date: 2018-06-06 15:46:23
Message-ID: CAKFQuwYsDgQd+x598aWWf05FzfTEXxnSJXQCZQ=SSZ8RyaiM5w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wednesday, June 6, 2018, David Gauthier <davegauthierpg(at)gmail(dot)com> wrote:

> Hi:
>
> Is there a way to do the equivalent of a "\set foo 1" through perl dbi ?
> I tried...
> $dbh->do("\\set foo 1");
> and got a syntax error
>
> Of course, I'd also have to be able to access the value of foo once its
> set. I'm guessing the usual way ??? (select :foo)
>
>
No. Meta commands are psql client program only. You'd need to explain why
you want this to get reasonable server-side suggestions.

David J.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jerry Sievers 2018-06-06 15:54:40 Re: Which backend using which pg_temp_N schema?
Previous Message David Gauthier 2018-06-06 15:36:08 Doing a \set through perl DBI ?