Re: Get funcid when create function

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: 王翔宇 <wxyucs(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Get funcid when create function
Date: 2018-08-16 18:55:51
Message-ID: CA+TgmoY+fBNNQNDzT+WABrYYT12ijH4fQGaJMBwtM9SPnTMqCA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Aug 14, 2018 at 10:04 PM, 王翔宇 <wxyucs(at)gmail(dot)com> wrote:
> Yes, I had read this document, BUT it's call from PL/PGSQL. I want call it
> from c function.

You could look up the OID using e.g. LookupFuncWithArgs and then call
it using one of the OidFunctionCall macros, but it might be a bit
awkward. Perhaps it would be better to look at the C code inside that
function and use some of that same logic directly from your C code.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2018-08-16 19:05:30 Re: Index Skip Scan
Previous Message Robert Haas 2018-08-16 18:52:10 Re: FailedAssertion on partprune