From: | Robert Haas <rhaas(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Replace hardcoded switch in object_exists() with a lookup table. |
Date: | 2011-10-11 13:24:15 |
Message-ID: | E1RDcJb-0002Rx-5Q@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Replace hardcoded switch in object_exists() with a lookup table.
There's no particular advantage to this change on its face; indeed,
it's possible that this might be slightly slower than the old way.
But it makes this information more easily accessible to other
functions, and therefore paves the way for future code consolidation.
Performance isn't critical here, so there's no need to be smart about
how we do the search.
This is a heavily cut-down version of a patch from KaiGai Kohei,
with several fixes by me. Additional review from Dimitri Fontaine.
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/fa351d5a0db0672b6f586315720302e493116f27
Modified Files
--------------
src/backend/catalog/objectaddress.c | 257 ++++++++++++++++++++++------------
1 files changed, 166 insertions(+), 91 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2011-10-11 18:22:05 | pgsql: Rearrange the implementation of index-only scans. |
Previous Message | Robert Haas | 2011-10-11 11:40:01 | pgsql: Repair breakage in VirtualXactLock. |