From: stan <stanb@panix.com>
To: Ravi Krishna <srkrishna@gmx.com>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Determining the type of an obkect in plperl
Date: Thu, 5 Mar 2020 06:21:49 -0500
Message-ID: <20200305112149.GA10537@panix.com> (raw)
In-Reply-To: <em548f46bc-f6d0-48fa-9bbd-ec556546ecdf@desktop-n1em137>
References: <20200304232135.GA16468@panix.com>
<em548f46bc-f6d0-48fa-9bbd-ec556546ecdf@desktop-n1em137>
On Thu, Mar 05, 2020 at 12:27:12AM +0000, Ravi Krishna wrote:
>
> >
> > how can I determine what the data type of the value element is?
> >
> perl has a ref function which can tell what type of object.
>
> https://perldoc.perl.org/functions/ref.html
> >
>
>
> --
> This email has been checked for viruses by Avast antivirus software.
> https://www.avast.com/antivirus
>
Even checking gisnt teh _TD structure does not return a value:
foreach my $key (sort keys %{$_TD->{old}}) {
my $ref1 = ref $_TD->{old}->{$key};
my $ref2 = ref $_TD->{new}->{$key};
elog(NOTICE, "ref1 = $ref1 ref2 = $ref2" );
.
.
.
Results in the following output:
NOTICE: ref1 = ref2 =
--
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
-- Benjamin Franklin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: stanb@panix.com, srkrishna@gmx.com
Subject: Re: Determining the type of an obkect in plperl
In-Reply-To: <20200305112149.GA10537@panix.com>
References: <20200304232135.GA16468@panix.com> <em548f46bc-f6d0-48fa-9bbd-ec556546ecdf@desktop-n1em137> <20200305112149.GA10537@panix.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox