Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Support for %TYPE in CREATE FUNCTION

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Ian Lance Taylor <ian(at)airs(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] Support for %TYPE in CREATE FUNCTION
Date: 2001-05-29 01:13:52
Message-ID: 200105290113.f4T1DqO05559@candle.pha.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> 
> > Sorry, looks like this patch has to be rejected because it can not
> > handle table changes.
> 
> > > This patch adds support for %TYPE in CREATE FUNCTION argument and
> > > return types.
> 
> Does anybody want to suggest how to handle table changes?  Does
> anybody want to work with me to make this patch acceptable?  Or is
> this functionality of no interest to the Postgres development team?

I think the major problem was that our pg_proc table doesn't have any
way of handling arg changes.  In fact, we need a ALTER FUNCTION
capability first so we can recreate functions in place with the same
OID.  We may then be able to recreate the function on table change, but
I think we will need this TODO item done also:

	* Add pg_depend table to track object dependencies

So it seems we need two items done first, then we would have the tools
to properly implement this functionality.

So, yes, the functionality is desired, but it has to be done with the
proper groundwork already in place.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

In response to

Responses

pgsql-hackers by date

Next:From: Joe ConwayDate: 2001-05-29 02:55:37
Subject: Re: Re: [INTERFACES] remote database queries
Previous:From: Ian Lance TaylorDate: 2001-05-28 22:47:24
Subject: Re: [HACKERS] Support for %TYPE in CREATE FUNCTION

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-05-29 01:15:39
Subject: Re: Patch to remove sort files, temp tables, unreferenced files
Previous:From: Ian Lance TaylorDate: 2001-05-28 22:47:24
Subject: Re: [HACKERS] Support for %TYPE in CREATE FUNCTION

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group