Re: plperl syntax question

2020-03-12 Thread David G. Johnston
On Thursday, March 12, 2020, Rob Sargent wrote: > > The example I saw for qq on the perl site > > print(qq(Welcome to GeeksForGeeks)); > > doesn’t have any quotes in arg to qq > Correct. It also says: qq() operator in Perl can be used in pl

Re: plperl syntax question

2020-03-12 Thread David G. Johnston
On Thursday, March 12, 2020, Rob Sargent wrote: > > > On Mar 12, 2020, at 7:44 PM, stan wrote: > > On Thu, Mar 12, 2020 at 06:37:02PM -0700, David G. Johnston wrote: > > On Thursday, March 12, 2020, stan wrote: > > > my $rv3 = spi_exec_query('$stmt'); > What am I doing wrong here? > > > Putting

Re: plperl syntax question

2020-03-12 Thread Rob Sargent
> On Mar 12, 2020, at 7:44 PM, stan wrote: > > On Thu, Mar 12, 2020 at 06:37:02PM -0700, David G. Johnston wrote: >> On Thursday, March 12, 2020, stan wrote: >>> >>> my $rv3 = spi_exec_query('$stmt'); >>> What am I doing wrong here? >>> >> >> Putting a variable name into a single-quoted str

Re: plperl syntax question

2020-03-12 Thread stan
On Thu, Mar 12, 2020 at 06:37:02PM -0700, David G. Johnston wrote: > On Thursday, March 12, 2020, stan wrote: > > > > my $rv3 = spi_exec_query('$stmt'); > > What am I doing wrong here? > > > > Putting a variable name into a single-quoted string and expecting it to > resolve to the contents of sai

Re: plperl syntax question

2020-03-12 Thread stan
On Thu, Mar 12, 2020 at 06:00:01PM -0600, Rob Sargent wrote: > > > > On Mar 12, 2020, at 5:16 PM, stan wrote: > > > > On Thu, Mar 12, 2020 at 04:58:08PM -0600, Rob Sargent wrote: > >> > >> > >>> On Mar 12, 2020, at 4:49 PM, stan wrote: > >>> > >>> On Thu, Mar 12, 2020 at 04:45:58PM -0600, R

Re: plperl syntax question

2020-03-12 Thread David G. Johnston
On Thursday, March 12, 2020, stan wrote: > > my $rv3 = spi_exec_query('$stmt'); > What am I doing wrong here? > Putting a variable name into a single-quoted string and expecting it to resolve to the contents of said variable instead of being treated as a literal. David J.

Re: plperl syntax question

2020-03-12 Thread Rob Sargent
> On Mar 12, 2020, at 4:34 PM, stan wrote: > > I am trying to run a query in plperl that uses a Perl variable from the > same function. > > Here is the code snippet: > > my $stmt = qq("SELECT employee_key from employee where id = '$user' ;"); > elog( NOTICE, "stmt = $stmt" ); > my $rv3 = spi