Re: [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc - Mailing list pgsql-hackers

From Jeevan Chalke
Subject Re: [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc
Date
Msg-id CAM2+6=X=5i-csDsnH0Mx2w-9VfL5+x7tyPzpjmzKq3_sqR25rg@mail.gmail.com
Whole thread Raw
In response to Re: [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc  (Mark Wong <markwkm@gmail.com>)
Responses Re: [Review] Add SPI_gettypmod() to return a field's typemod from a TupleDesc
List pgsql-hackers
Hi Mark,

Is this the latest patch you are targeting for 9.4 CF1 ?

I am going to review it.

From the comment, here is one issue you need to resolve first:

*************** exec_eval_datum(PLpgSQL_execstate *estat
*** 4386,4396 ****
                               errmsg("record \"%s\" has no field \"%s\"",
                                      rec->refname, recfield->fieldname)));
                  *typeid = SPI_gettypeid(rec->tupdesc, fno);
!                 /* XXX there's no SPI_gettypmod, for some reason */
!                 if (fno > 0)
!                     *typetypmod = rec->tupdesc->attrs[fno - 1]->atttypmod;
!                 else
!                     *typetypmod = -1;
                  *value = SPI_getbinval(rec->tup, rec->tupdesc, fno, isnull);
                  break;
              }
--- 4386,4392 ----
                               errmsg("record \"%s\" has no field \"%s\"",
                                      rec->refname, recfield->fieldname)));
                  *typeid = SPI_gettypeid(rec->tupdesc, fno);
!                 *typetypmod = SPI_gettypeid(rec->tupdesc, fno);
                  *value = SPI_getbinval(rec->tup, rec->tupdesc, fno, isnull);
                  break;
              }


Once you confirm, I will go ahead reviewing it.

Thanks


On Sat, Feb 9, 2013 at 10:37 PM, Mark Wong <markwkm@gmail.com> wrote:
On Tue, Jul 3, 2012 at 8:33 AM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Thu, Jun 28, 2012 at 9:49 AM, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Mon, Jun 18, 2012 at 3:29 PM, Amit Kapila <amit.kapila@huawei.com> wrote:
>>> [ review ]
>>
>> Chetan, this patch is waiting for an update from you.  If you'd like
>> this to get committed this CommitFest, we'll need an updated patch
>> soon.
>
> Hearing no response, I've marked this patch Returned with Feedback.

Hello everyone,

I thought I'd take a stab at helping finish this patch.  I have made
an attempt at adding documentation and replacing the couple of XXX
comments.  I'll add it to the next commitfest.

Regards,
Mark


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers




--
Jeevan B Chalke
Senior Software Engineer, R&D
EnterpriseDB Corporation
The Enterprise PostgreSQL Company

Phone: +91 20 30589500

Website: www.enterprisedb.com
EnterpriseDB Blog: http://blogs.enterprisedb.com/
Follow us on Twitter: http://www.twitter.com/enterprisedb

This e-mail message (and any attachment) is intended for the use of the individual or entity to whom it is addressed. This message contains information from EnterpriseDB Corporation that may be privileged, confidential, or exempt from disclosure under applicable law. If you are not the intended recipient or authorized to receive this for the intended recipient, any use, dissemination, distribution, retention, archiving, or copying of this communication is strictly prohibited. If you have received this e-mail in error, please notify the sender immediately by reply e-mail and delete this message.

pgsql-hackers by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: Reduce maximum error in tuples estimation after vacuum.
Next
From: Rushabh Lathia
Date:
Subject: Re: proposal: enable new error fields in plpgsql (9.4)