Re: Q about InsertIndexResult

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Teodor Sigaev <teodor(at)stack(dot)net>
Cc: Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Q about InsertIndexResult
Date: 2003-02-12 16:30:36
Message-ID: 4909.1045067436@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Teodor Sigaev <teodor(at)stack(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Treat 2003-02-12 16:36:19 Re: Changing the default configuration
Previous Message Jean-Michel POURE 2003-02-12 16:26:22 Re: PostgreSQL Windows port strategy