Re: Q about InsertIndexResult - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Q about InsertIndexResult
Date
Msg-id 4909.1045067436@sss.pgh.pa.us
Whole thread Raw
In response to Q about InsertIndexResult  (Teodor Sigaev <teodor@stack.net>)
Responses Re: Q about InsertIndexResult  (Teodor Sigaev <teodor@stack.net>)
List pgsql-hackers
Teodor Sigaev <teodor@stack.net> writes:
> [ why do we have InsertIndexResult and not just a bool? ]

Good question.  Perhaps it was used once upon a time?  That API has been
like that since Berkeley days.

I can't offhand see a good reason to return the index tuple's tid.
There isn't any legitimate reason for anything outside the index AM
to be doing anything directly with the index tuple.

I dunno if it's worth the trouble to change it just to save one palloc
per insert, though.  If we ever decided that there was some other piece
of information that the index AM should return, we'd have to change
right back to returning a struct...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: PostgreSQL Windows port strategy
Next
From: Robert Treat
Date:
Subject: Re: Changing the default configuration