Re: WIP: Rework access method interface

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: WIP: Rework access method interface
Date: 2015-12-14 14:26:36
Message-ID: 566ED19C.4090805@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2015-12-12 23:17, Alexander Korotkov wrote:
> On Sat, Dec 12, 2015 at 9:21 PM, Petr Jelinek <petr(at)2ndquadrant(dot)com
> <mailto:petr(at)2ndquadrant(dot)com>> wrote:
>
> On 2015-12-09 15:09, Alexander Korotkov wrote:
>
>
> ​Patch was rebased against current master.
> Any notes about current version of patch?
> It would be nice to commit it and continue work on other parts of am
> extendability.​
>
>
> The rebase seems broken, there are things missing in this version of
> the patch (for example the validation functions).
>
>
> ​Ooops, sorry. Correct version is attached.​
>

Hi,

I went over this.

I get these compiler warning about unused variables in the validation
functions:
brin.c: In function ‘brinvalidate’:
brin.c:94:6: warning: variable ‘keytype’ set but not used
[-Wunused-but-set-variable]
keytype;
^
ginutil.c: In function ‘ginvalidate’:
ginutil.c:86:6: warning: variable ‘keytype’ set but not used
[-Wunused-but-set-variable]
keytype;
^
gist.c: In function ‘gistvalidate’:
gist.c:101:6: warning: variable ‘keytype’ set but not used
[-Wunused-but-set-variable]
keytype;
^
hash.c: In function ‘hashvalidate’:
hash.c:103:6: warning: variable ‘keytype’ set but not used
[-Wunused-but-set-variable]
keytype;
^
nbtree.c: In function ‘btvalidate’:
nbtree.c:134:6: warning: variable ‘keytype’ set but not used
[-Wunused-but-set-variable]
keytype;
^
nbtree.c:133:6: warning: variable ‘intype’ set but not used
[-Wunused-but-set-variable]
intype,
^
spgutils.c: In function ‘spgvalidate’:
spgutils.c:88:6: warning: variable ‘keytype’ set but not used
[-Wunused-but-set-variable]
keytype;
^

These look like copy-pastos of boilerplate.

Another note is that amvalidate SQL interface is not documented
anywhere. I know it's mainly meant for regression tests and we for
example don't document hashing functions but it's something to think
about/discuss maybe.

Other than that I am happy with the patch.

--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2015-12-14 14:43:07 Re: Fixing warnings in back branches?
Previous Message Amit Kapila 2015-12-14 13:38:10 Re: parallel joins, and better parallel explain