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

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

From: Roberto Mello <rmello(at)cc(dot)usu(dot)edu>
To: pgsql-hackers(at)postgresql(dot)org, pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] Support for %TYPE in CREATE FUNCTION
Date: 2001-04-28 14:55:32
Message-ID: 20010428085532.F19580@cc.usu.edu (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
On Fri, Apr 27, 2001 at 08:45:25PM -0700, Ian Lance Taylor wrote:
> This patch adds support for %TYPE in CREATE FUNCTION argument and
> return types.
> 
> %TYPE is already supported by PL/pgSQL when declaring variables.
> However, that does not help with the argument and return types in
> CREATE FUNCTION.
> 
> Using %TYPE makes it easier to write a function which is independent
> of the definition of a table.  That is, minor changes to the types
> used in the table may not require changes to the function.

	Wow! This would be _very_ useful! It's something I wish PostgreSQL 
had and I miss it everytime I write functions and remember PL/SQL.

	Thanks a lot Ian, I hope this one makes it in (hopefully for 7.1.1)

	-Roberto
-- 
+----| http://fslc.usu.edu USU Free Software & GNU/Linux Club |------+
  Roberto Mello - Computer Science, USU - http://www.brasileiro.net 
       http://www.sdl.usu.edu - Space Dynamics Lab, Developer    
-----*'.     (Explosive Tagline)

In response to

Responses

pgsql-hackers by date

Next:From: MatthewDate: 2001-04-28 17:17:58
Subject: SAPDB Open Souce
Previous:From: Tatsuo IshiiDate: 2001-04-28 12:15:28
Subject: WAL performance with wal_sync_method = open_sync

pgsql-patches by date

Next:From: Bruce MomjianDate: 2001-04-28 22:45:39
Subject: Re: Re: [HACKERS] Support for %TYPE in CREATE FUNCTION
Previous:From: Ian Lance TaylorDate: 2001-04-28 03:45:25
Subject: Support for %TYPE in CREATE FUNCTION

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