From: | "Antonis Antoniou" <a(dot)antoniou(at)albourne(dot)com> |
---|---|
To: | "Patrice OLIVER" <oliverp21(at)free(dot)fr> |
Cc: | <pgsql-sql(at)postgresql(dot)org> |
Subject: | Re: Problem with stored procedure |
Date: | 2004-08-26 14:59:10 |
Message-ID: | 412DFABE.3090008@albourne.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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'';
From | Date | Subject | |
---|---|---|---|
Next Message | Ian Percival | 2004-08-26 15:58:10 | expression_tree_walker: Unexpected node type 711 |
Previous Message | Richard Huxton | 2004-08-26 13:31:36 | Re: Problem with stored procedure |