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

From: Shaozhong SHI <shishaozhong(at)gmail(dot)com>
To: depesz(at)depesz(dot)com
Cc: 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:22:34
Message-ID: CA+i5JwY_=zsFewDrTWQ7fw5E6EBjnYVHBfTEUVfZV-pD+AXoUQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

If so, can we use Oracle SQL script in DO block?

Does this mean that all Oracle SQL can be used in Postgres?

Regards,

David

On Wed, 5 Jan 2022 at 11:12, hubert depesz lubaczewski <depesz(at)depesz(dot)com>
wrote:

> 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
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Shaozhong SHI 2022-01-05 11:26:49 Re: Can we use sql language to create a function in Postgres?
Previous Message hubert depesz lubaczewski 2022-01-05 11:12:59 Re: Can we use sql language to create a function in Postgres?