From: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> |
---|---|
To: | Phillip Diffley <pdiffley12(at)gmail(dot)com> |
Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
Subject: | Re: Language options for GIN index support functions |
Date: | 2023-02-07 05:12:39 |
Message-ID: | CAFj8pRD2sL+n9WpE_d86F7_ZJG7nN6Zd+vsf6CkBko9b=QsJEA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Hi
út 7. 2. 2023 v 3:49 odesílatel Phillip Diffley <pdiffley12(at)gmail(dot)com>
napsal:
> Hello,
>
> The support functions and operator methods needed to extend a GIN index
> are documented in C syntax
> <https://www.postgresql.org/docs/current/gin-extensibility.html>. Do
> these functions need to be implemented in C, or is there an interface for
> other languages like PL/pgSQL?
>
PL/pgSQL can use only function that are callable from SQL - they have to
use Version1 calling convention
https://www.postgresql.org/docs/current/xfunc-c.html#id-1.8.3.13.7
GIN support functions use classic C functions, that means they can be
called only from C and languages that support C calls. PL/pgSQL doesn't do
this.
PL/pgSQL is just glue for SQL - it can be used for implementation of some
customer business tasks, but it cannot be (almost) used for Postgres
extending.
Regards
Pavel
> Thanks!
> Phillip
>
From | Date | Subject | |
---|---|---|---|
Next Message | Laurenz Albe | 2023-02-07 08:30:48 | Re: ALTER COLUMN to change GENERATED ALWAYS AS expression? |
Previous Message | Phillip Diffley | 2023-02-07 02:48:51 | Language options for GIN index support functions |