Re: Problem with stored procedure

Поиск
Список
Период
Сортировка
От Antonis Antoniou
Тема Re: Problem with stored procedure
Дата
Msg-id 412DFABE.3090008@albourne.com
обсуждение исходный текст
Ответ на Problem with stored procedure  (Patrice OLIVER <oliverp21@free.fr>)
Список pgsql-sql
Patrice OLIVER wrote:

> Hello,
>
> In this example, I use 2 tables :
> create table types (
> typnum integer primary key,
> catcode varchar(2),
> typlib varchar(35));
>
> create table uv (
> uvnum varchar(5) primary key,
> typnum integer,
> uvlib varchar(50));
>
> alter table uv
>   add constraint fk_uv_type foreign key (typnum)
>      references types (typnum)
>      on delete restrict on update restrict;
>
> I also use stored procedures :
>
> create function numtype(varchar) returns integer as '
> declare
>   codetype alias for $1;
>   coderet integer;
> begin
>   select into coderet typnum from types
>       where typcode = codetype and catcode = ''UV'';

why not -> select *typenum* into coderet  from types     where typcode = codetype and catcode = ''UV'';


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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Problem with stored procedure
Следующее
От: Greg Stark
Дата:
Сообщение: Re: from PG_DUMP to CVS