Re: Can we use sql language to create a function in Postgres? - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: Can we use sql language to create a function in Postgres?
Date
Msg-id 20220105111258.GA18163@depesz.com
Whole thread Raw
In response to Can we use sql language to create a function in Postgres?  (Shaozhong SHI <shishaozhong@gmail.com>)
Responses Re: Can we use sql language to create a function in Postgres?  (Shaozhong SHI <shishaozhong@gmail.com>)
List pgsql-general
On Wed, Jan 05, 2022 at 11:04:34AM +0000, Shaozhong SHI wrote:
> I was given an Oracle script.  Can we use sql language to create a function
> in Postgres?

Sure:

create function z() returns int4 language sql as $$
select 123;
$$;

depesz



pgsql-general by date:

Previous
From: Ray O'Donnell
Date:
Subject: Re: Can we use sql language to create a function in Postgres?
Next
From: Shaozhong SHI
Date:
Subject: Re: Can we use sql language to create a function in Postgres?