Re: C function argument types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bogdan Vlad <bogdancvlad(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: C function argument types
Date: 2010-05-19 18:15:29
Message-ID: 22565.1274292929@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bogdan Vlad <bogdancvlad(at)gmail(dot)com> writes:
> How can I determine the pg_class oid of the argument type in a
> polymorphic C function when it's called with a table row?

You're confusing pg_class oid with pg_type oid. The type oid
of the function argument is necessarily going to be a *type* oid.

You can look at the pg_type row to find the associated pg_class oid,
if it's a composite type (it might not be!)

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-05-19 18:29:30 Re: pg_upgrade - link mode and transaction-wraparound data loss
Previous Message Tom Lane 2010-05-19 18:03:38 Re: Building the 64-bit Postgres