Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f98N8Cn11366 for ; Mon, 8 Oct 2001 19:08:12 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 144013; Mon, 08 Oct 2001 16:08:05 -0700 From: "Josh Berkus" Subject: Re: SQL-Programmer tool and field%type support To: Roberto Mello , Mourad EL HADJ MIMOUNE Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Mon, 08 Oct 2001 16:08:05 -0700 Message-ID: In-Reply-To: <20011008120934.A4030@cc.usu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200110/126 X-Sequence-Number: 5081 Mourad, > > I have an other question about the use of %type and alias in > PL/SQL. So the > > excution of functions containing varibales of type > maytable.field1%type > > prompts parser errors. > > error on the creation of the function : > > create function test (int) returns maytable.field1%type as' ... What Roberto is saying is that the declaration: DECLARE v_field1 mytable.field1%type is supported internal to a PL/pgSQL function, but CREATE FUNCTION test1(int) RETURNS mytable.filed1%type is not. This is because the %type declaration is supported in PL/pgSQL, but not in Postgres SQL. -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco