From: | "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> |
---|---|
To: | Rob Sargent <robjsargent(at)gmail(dot)com> |
Cc: | stan <stanb(at)panix(dot)com>, "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org> |
Subject: | Re: plperl syntax question |
Date: | 2020-03-13 03:06:17 |
Message-ID: | CAKFQuwZa_k+7ZMrwksb+TGE9dP-mo1J9W1VHz7dSimA8cBFNEA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Thursday, March 12, 2020, Rob Sargent <robjsargent(at)gmail(dot)com> wrote:
>
>
> On Mar 12, 2020, at 7:44 PM, stan <stanb(at)panix(dot)com> wrote:
>
> On Thu, Mar 12, 2020 at 06:37:02PM -0700, David G. Johnston wrote:
>
> On Thursday, March 12, 2020, stan <stanb(at)panix(dot)com> 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.
>
>
> Please look at this.
>
> Here is the code:
>
> my $stmt = qq('SELECT employee_key from employee where id = $user ;');
> elog( NOTICE, "stmt = $stmt" );
> my $rv3 = spi_exec_query($stmt);
>
>
So you fixed the error in the third line i and others pointed out but then
decided to introduce a new error by changing the first line...
David J.
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2020-03-13 03:10:52 | Re: plperl syntax question |
Previous Message | Rob Sargent | 2020-03-13 01:54:29 | Re: plperl syntax question |