Doing a \set through perl DBI ?

From: David Gauthier <davegauthierpg(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Doing a \set through perl DBI ?
Date: 2018-06-06 15:36:08
Message-ID: CAMBRECBL6N6Mrt12R1sJfLbG=B4igQ+Pv7KdLwRbNL5Omx9ejg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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)

Thanks for any help !

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2018-06-06 15:46:23 Re: Doing a \set through perl DBI ?
Previous Message Joshua D. Drake 2018-06-06 15:34:23 Re: Code of Conduct plan