passing constant parameters to functional indices - Mailing list pgsql-hackers

From Abhijit Menon-Sen
Subject passing constant parameters to functional indices
Date
Msg-id 20030514211433.A27275@lustre.dyn.wiw.org
Whole thread Raw
Responses Re: passing constant parameters to functional indices
List pgsql-hackers
I'd like to add support for specifying constant parameters when creating
a functional index, e.g. create index foo on bar (substr(baz, 1, 32));

Is this a good idea?

If so, I'd like to ask for some suggestions before I proceed any further
towards implementing it.

The arguments to the index function are represented as T_Strings. I need
to add some way to distinguish between field names and string constants.
I could create A_Const nodes for numeric or string constants, and leave
column names as T_Strings; alternatively, I could add a T_Name type and
use it to store column names. Which is preferable? What's the best way
to pass the parameters on to FormIndexDatum()?

Any other suggestions will be appreciated, since this is my first foray
into the PostgreSQL source (but it's been pleasant reading so far :).

-- ams

PS: Are mbox archives of the list available somewhere? I tried to look   for related threads in the web archive, but I
quicklytired of the   "Try to produce less restrictive search query." (sic) message.
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Client encoding conversion for binary data (was Re: GUC and postgresql.conf docs)
Next
From: "Andrew Dunstan"
Date:
Subject: Re: Repeated? Transient Delivery Failure (fwd)