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
Patrice OLIVER wrote:
[snip]
create function insert_uv(varchar,varchar,varchar) returns integer as '
declare
codeuv alias for $1;
codetype alias for $2;
libuv alias for $3;
cletype integer;
begin
select into cletype numtype(codeuv);
insert into uv values (codeuv, cletype, libuv);
retu
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 type