Skip site navigation (1) Skip section navigation (2)

Re: Review: B-Tree emulation for GIN

From: Teodor Sigaev <teodor(at)sigaev(dot)ru>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Ibrar Ahmed <ibrar(dot)ahmad(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Review: B-Tree emulation for GIN
Date: 2009-01-16 14:42:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
> I have merged this with HEAD, written a brief document (which is mostly
> a copy of the btree-gist page), added the module to the contrib
> Makefile, and made some very minor changes. Patch attached.
Thank you

> A couple comments:
> 1. Right now, to implement "less than" you need to start at the
> beginning of the index and scan until you reach the supplied query
> datum. This is because GIN doesn't support backwards scans
> ( ).
> Unfortunately, that means numeric is not supportable for btree-gin
> because there is no left-most value from which to start the scan. Do you
> see an easy workaround to support numeric?
Hmm, let we use minimal varlena struct (with size equal to VARHDRSZ) as 
left-most (and fake) value. It is never used for any actual argument except 
compare function, so, new compare function is provided. New version of patch is 
attached and it based on on your patch (btree-gin.20090111.patch.gz).

 > 2. Why do you create a shell type "int32" from btree_gin.sql? I tried
 > doing a search-and-replace to use "int4" instead, and it seems to work
 > fine (and eliminates the warnings). I left it with int32 in my version
 > of the patch because I thought you may have some reason for using it.

My mistake, thank you for fix
Teodor Sigaev                                   E-mail: teodor(at)sigaev(dot)ru

Attachment: btree_gin-0.7.gz
Description: application/x-tar (14.7 KB)

In response to


pgsql-hackers by date

Next:From: Andrew ChernowDate: 2009-01-16 14:44:18
Subject: Re: libpq WSACleanup is not needed
Previous:From: Magnus HaganderDate: 2009-01-16 14:36:26
Subject: Re: libpq WSACleanup is not needed

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group