Re: Can we use sql language to create a function in Postgres?

From: Ray O'Donnell <ray(at)rodonnell(dot)ie>
To: Shaozhong SHI <shishaozhong(at)gmail(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Can we use sql language to create a function in Postgres?
Date: 2022-01-05 11:08:42
Message-ID: 3716cb3b-21e9-a204-1b2c-37a4f023c72f@rodonnell.ie
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 05/01/2022 11:04, Shaozhong SHI wrote:
> I was given an Oracle script.  Can we use sql language to create a
> function in Postgres?

Yes, absolutely:

create function my_function(...)
as
$$
select.....
$$
language sql;

Is this what you mean?

Ray.

--
Raymond O'Donnell // Galway // Ireland
ray(at)rodonnell(dot)ie

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ray O'Donnell 2022-01-05 11:10:02 Re: Can we use sql language to create a function in Postgres?
Previous Message Shaozhong SHI 2022-01-05 11:04:34 Can we use sql language to create a function in Postgres?