Re: Pgxs - How to reference another extension

From: Artur Zakirov <zaartur(at)gmail(dot)com>
To: Michał Kłeczek <michal(at)kleczek(dot)org>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Pgxs - How to reference another extension
Date: 2024-03-11 13:08:24
Message-ID: CAKNkYnz7qseGPd+Lh12L6=LsNy8wHaqhPmTiuEeJtGS77VysCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 11 Mar 2024 at 13:26, Michał Kłeczek <michal(at)kleczek(dot)org> wrote:
>
>
> > On 11 Mar 2024, at 11:41, Michał Kłeczek <michal(at)kleczek(dot)org> wrote:
> >
> > Hi,
> >
> > I am trying to create an extension that delegates some calls to btree_gist functions:
> >
> > DirectFunctionCall5Coll(
> > gbt_text_consistent, …other arguments);
> >
> > Basic PGXS Makefile does not work - I get linker error:
> >
> > Undefined symbols for architecture arm64:
> > "_gbt_text_consistent", referenced from:
> >
> >
> > Anyone could provide me with some hints?
>
> I’ve added:
> PG_LDFLAGS += -L$(shell $(PG_CONFIG) --pkglibdir) -lbtree_gist

You can try FunctionCall5Coll() or OidFunctionCall5Coll() functions.

OidFunctionCall5Coll() calls fmgr_info() and FunctionCall5Coll(). What
you only need is Oid of the target function.

FunctionCall5Coll() can be useful and used when you have a cache
variable of the function, where you store previously calculated
FmgrInfo.

--
Artur

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2024-03-11 13:20:52 Re: alter table xxx alter column yyy set (n_distinct=nnnn );
Previous Message Tefft, Michael J 2024-03-11 12:36:41 alter table xxx alter column yyy set (n_distinct=nnnn );