Re: SQL-Programmer tool and field%type support

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: SQL-Programmer tool and field%type support
Дата
Msg-id web-144013@davinci.ethosmedia.com
обсуждение исходный текст
Ответ на Re: SQL-Programmer tool and field%type support  (Roberto Mello <rmello@cc.usu.edu>)
Ответы Re: SQL-Programmer tool and field%type support  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
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
informationtechnology      josh@agliodbs.com  and data management solutions       (415) 565-7293 for law firms, small
businesses       fax 621-2533   and non-profit organizations.      San Francisco
 


В списке pgsql-sql по дате отправления:

Предыдущее
От: Roberto Mello
Дата:
Сообщение: Re: SQL-Programmer tool and field%type support
Следующее
От: "Saurabh Mittal"
Дата:
Сообщение: ROUND function ??