Re: TABLESAMPLE patch - Mailing list pgsql-hackers

From Kyotaro HORIGUCHI
Subject Re: TABLESAMPLE patch
Date
Msg-id 20150128.162331.13401375.horiguchi.kyotaro@lab.ntt.co.jp
Whole thread Raw
In response to Re: TABLESAMPLE patch  (Petr Jelinek <petr@2ndquadrant.com>)
Responses Re: TABLESAMPLE patch
List pgsql-hackers
Hi, I took a look on this and found nice.

By the way, the parameter for REPEATABLE seems allowing to be a
expression in ParseTableSample but the grammer rejects it.

The following change seems enough.

diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 4578b5e..8cf09d5 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -10590,7 +10590,7 @@ tablesample_clause:        ;opt_repeatable_clause:
-            REPEATABLE '(' AexprConst ')'    { $$ = (Node *) $3; }
+            REPEATABLE '(' a_expr ')'    { $$ = (Node *) $3; }            | /*EMPTY*/                        { $$ =
NULL;}        ;
 


regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center




pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: proposal: row_to_array function
Next
From: Pavel Stehule
Date:
Subject: Re: proposal: row_to_array function