Re: FETCH FIRST clause PERCENT option - Mailing list pgsql-hackers

From Mark Dilger
Subject Re: FETCH FIRST clause PERCENT option
Date
Msg-id BAE042C9-6825-403E-AF07-1CFC8294DAFD@gmail.com
Whole thread Raw
In response to Re: FETCH FIRST clause PERCENT option  (Mark Dilger <hornschnorter@gmail.com>)
List pgsql-hackers

> On Sep 25, 2018, at 8:08 AM, Mark Dilger <hornschnorter@gmail.com> wrote:
>
>
>
>> On Sep 25, 2018, at 5:07 AM, Surafel Temesgen <surafel3000@gmail.com> wrote:
>>
>> hey
>>
>> On 9/21/18, Mark Dilger <hornschnorter@gmail.com> wrote:
>>
>>> Surafel, there are no regression tests that I can see in your patch.  It
>>> would help if you added some, as then I could precisely what behavior you
>>> are expecting.
>> thank you for looking at it .the attach patch add regression tests
>> <fetch-wth-percent-v4.patch>
>
> Surafel,
>
> I messed around with your changes to the grammar and it seems you don't
> need to add PERCENT as a reserved keyword.  Moving this to the unreserved
> keyword section does not cause any shift/reduce errors, and the regression
> tests still pass.  Relative to your patch v4, these changes help:

I spoke too soon.  The main regression tests pass, but your change to
src/test/modules/test_ddl_deparse/sql/create_table.sql per Thomas's
suggestion is no longer needed, since PERCENT no longer needs to be
quoted.

I recommend you also apply the following to your v4 patch, which just
rolls back that one change you made, and at least for me, is enough
to get `make check-world` to pass:

diff --git a/src/test/modules/test_ddl_deparse/sql/create_table.sql
b/src/test/modules/test_ddl_deparse/sql/create_table.sql
index 4325de2d04..5e78452729 100644
--- a/src/test/modules/test_ddl_deparse/sql/create_table.sql
+++ b/src/test/modules/test_ddl_deparse/sql/create_table.sql
@@ -94,7 +94,7 @@ CREATE TABLE student (
 ) INHERITS (person);

 CREATE TABLE stud_emp (
-       "percent"       int4
+       percent         int4
 ) INHERITS (emp, student);




pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Allowing printf("%m") only where it actually works
Next
From: Tom Lane
Date:
Subject: Re: Allowing printf("%m") only where it actually works