(on list; interesting topic)

> Tom, I'm looking at an oracle script and seeing something I haven't seen
> before.  Is this something oracle specific?  Can Postgres do it?
> CREATE OR REPLACE procedure inc_char_for_sort_key (old_char IN OUT CHAR,
> carry_p OUT INTEGER)
> It goes on, but it's the CREATE OR REPLACE part that I'm interested in.

That's interesting. In our case, you would do a "drop function" and
then the "create function" as a two step process. Oracle simplifies it
a bit for you. I'm not sure why we throw an error if you drop a
function which does not exist, since that makes it tough to blindly do
the "drop/create" pair. Why don't we just signal a warning or notice
instead?

                     - Thomas

-- 
Thomas Lockhart				lockhart@alumni.caltech.edu
South Pasadena, California

Fri, 15 Oct 1999 04:43:13 +0000
Thomas Lockhart <lockhart@alumni.caltech.edu>
Re: can postgres do this?
Thomas Lockhart <lockhart@alumni.caltech.edu> writes:
> I'm not sure why we throw an error if you drop a
> function which does not exist, since that makes it tough to blindly do
> the "drop/create" pair. Why don't we just signal a warning or notice
> instead?

It doesn't matter unless you are inside a transaction --- but I can
see the value of replacing a function definition inside a transaction.

Perhaps "no such <whatever>" should be downgraded from ERROR to NOTICE
for all DROP-type commands.  Another TODO item...

			regards, tom lane

Fri, 15 Oct 1999 10:13:09 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: [HACKERS] Re: can postgres do this? 