Re: Doing a \set through perl DBI ?

2018-06-07 Thread Francisco Olarte
David: On Wed, Jun 6, 2018 at 5:36 PM, David Gauthier 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. >

Re: Doing a \set through perl DBI ?

2018-06-06 Thread David Gauthier
I think I found my own answer. I wanted to use the current linux user's uid as part of a query (again, this is a perl/DBI script). I was thinking I might be able to set a variable into the DB session somehow using \set through DBI to accomplish this. The solution that finally occurred to me was

Re: Doing a \set through perl DBI ?

2018-06-06 Thread David G. Johnston
On Wednesday, June 6, 2018, David Gauthier 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

Doing a \set through perl DBI ?

2018-06-06 Thread David Gauthier
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 !