Re: [Beginner Question]Is there way to test the postgres's kernel function?

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Wen Yi <wen-yi(at)qq(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: [Beginner Question]Is there way to test the postgres's kernel function?
Date: 2023-07-24 14:56:02
Message-ID: CAKFQuwYgNWFacVuq9NV_Hzss9Y=97FRn74AyqqBA1cWdvXRZvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jul 24, 2023 at 2:43 AM Wen Yi <wen-yi(at)qq(dot)com> wrote:

> Hi community,
> I am learning the kernel of the postgres, and I want to test the
> make_relative_path function to know what it's operational principle.(I can
> read it's code, and I want to actually run it)
> But I really don't know how to do it, wrtite a extension?
>
> Can someone give me some advice?
>
>
A formal extension seems like overkill. PostgreSQL provides an ability to
write customer user-space functions in C. You ought to be able to leverage
that for this specific task.

https://www.postgresql.org/docs/current/xfunc-c.html

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David G. Johnston 2023-07-24 14:59:35 Re: Grant all privileges to user on a database
Previous Message Ron 2023-07-24 14:51:52 Re: Grant all privileges to user on a database