Alexander Korotkov <aekorot...@gmail.com> writes: > On Wed, Oct 12, 2011 at 12:35 AM, Tom Lane <t...@sss.pgh.pa.us> wrote: >> Maybe, instead of a simple constant amcanreturn column, we need an AM >> API function that says whether the index can return data.
> I like idea of such AM API function. Since single multicolumn index can use > multiple opclasses, AM API function should also say *what* data index can > return. I was thinking more like "amcanreturn(index, column_number) returns bool" which says if the index can return the data for that column. The AM would still have to return a full IndexTuple at runtime, but it'd be allowed to insert nulls or garbage for columns it hadn't promised to return. BTW, if we do this, I'm rather strongly tempted to get rid of the name-versus-cstring hack (see index_descriptor_hack() in HEAD) by defining btree name_ops as not capable of returning data. I don't trust that hack much at all. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers