Re: How to watch for schema changes - Mailing list pgsql-general

From Igor Korot
Subject Re: How to watch for schema changes
Date
Msg-id CA+FnnTwt=DfOH=HggP9tw1hj++eBymBeD4Rp2-w5JxeFjh5pDg@mail.gmail.com
Whole thread Raw
In response to Re: How to watch for schema changes  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: How to watch for schema changes  (Melvin Davidson <melvin6925@gmail.com>)
Re: How to watch for schema changes  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: How to watch for schema changes  (Adrian Klaver <adrian.klaver@aklaver.com>)
List pgsql-general
Hi, David,

On Tue, Jul 3, 2018 at 1:46 PM, David G. Johnston
<david.g.johnston@gmail.com> wrote:
> On Tue, Jul 3, 2018 at 11:41 AM, Igor Korot <ikorot01@gmail.com> wrote:
>>
>>
>> I presume threre is a query which check for the function/trigger
>> existence? Something like:
>>
>> IF NOT EXIST(SELECT * FROM ) CREATE OR REPLACE FUNCTION....;
>
>
> CREATE OR REPLACE is how you re-create a function that (whose
> name/signature) might already exist; CREATE already assumes one doesn't
> exist.

Why do I need to re-create a function with exactly the same name and body?
Can't I just check if such function exists?

Thank you.

>
> David J.
>


pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Split daterange into sub periods
Next
From: Melvin Davidson
Date:
Subject: Re: How to watch for schema changes