Re: checking variadic "any" argument in parser - should be array

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: checking variadic "any" argument in parser - should be array
Date: 2013-06-26 19:05:09
Message-ID: CAFj8pRC7vST1NRvQA3Rq0Xarg1XU6Xk2GADZRmEPbRbJRKe+jQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello

remastered version

Regards

Pavel

2013/6/26 Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>:
> Hi Pavel
>
>
> On Sat, Jan 26, 2013 at 9:22 AM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> wrote:
>>
>> Hello Tom
>>
>> you did comment
>>
>> ! <----><------><------> * Non-null argument had better be an array.
>> The parser doesn't
>> ! <----><------><------> * enforce this for VARIADIC ANY functions
>> (maybe it should?), so
>> ! <----><------><------> * that check uses ereport not just elog.
>> ! <----><------><------> */
>>
>> So I moved this check to parser.
>>
>> It is little bit stricter - requests typed NULL instead unknown NULL,
>> but it can mark error better and early
>
>
> Tom suggested that this check should be better done by parser.
> This patch tries to accomplish that.
>
> I will go review this.
>
> However, is it possible to you to re-base it on current master? I can't
> apply it using "git apply" but patch -p1 was succeeded with lot of offset.
>
> Thanks
>
>>
>>
>> Regards
>>
>> Pavel
>>
>>
>> --
>> Sent via pgsql-hackers mailing list (pgsql-hackers(at)postgresql(dot)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.

Attachment Content-Type Size
variadic_any_parser_check-2.patch application/octet-stream 10.7 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Szymon Guz 2013-06-26 19:05:10 Re: Add more regression tests for CREATE OPERATOR
Previous Message Alvaro Herrera 2013-06-26 19:02:34 Re: Kudos for Reviewers -- straw poll