Home > Archive > PostgreSQL Hacks > August 2005 > Selectivity function argument: Const -> Array









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Selectivity function argument: Const -> Array
Ilia Kantor

2005-08-29, 9:23 am

I want to write a selectivity function for GIST indexes.



The select condition is somefield && array[1,2,3],

But when I'm inside selectivity function I get args: T_Var, T_Const.



So function needs to get the actual array contents from T_Const .



How to do it ?



P.S

T_Const is like

$18 = {xpr = {type = T_Const}, consttype = 1007, constlen = -1, constvalue =
138884428, constisnull = 0 '\0',

constbyval = 0 '\0'}





Thank you!


Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com