typenameTypeId refactoring

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: typenameTypeId refactoring
Date: 2010-10-24 19:42:30
Message-ID: 1287949350.24847.6.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Here is a first patch to slightly refactor the type and typmod lookups
with the aim of making it easier to possibly changing the nature or
representation of typmods in the future and making it easier to merge
the collation patch.

I split the typenameTypeId function into two. Most call sites only care
about the type OID; a second function typenameTypeIdAndMod returns type
ID and typmod. So it is more explicit about which places care about
what. It also cuts down on the unholy interface design of returning
half the return value via function result and the other half via an
argument pointer.

Attachment Content-Type Size
typenametypeid.patch text/x-patch 18.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Brendan Jurd 2010-10-24 20:13:46 Segfault in 9.0 inlining SRF
Previous Message Tom Lane 2010-10-24 19:33:42 Re: WIP: extensible enums