From: | "Troy" <troy(at)hendrix(dot)biz> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | tablename.columnname%TYPE in Functions & Types |
Date: | 2005-10-28 07:29:04 |
Message-ID: | 1130484544.779248.56760@o13g2000cwo.googlegroups.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
My ref:
http://developer.postgresql.org/docs/postgres/plpgsql-declarations.html
WHAT AM I MISSING in my ORACLE to PG Port?
--1) I write
CREATE FUNCTION func1( var_1 INOUT T_TABLE1.C_COL1%TYPE, var_2 IN
INTEGER) AS.....
--2) It works but,
NOTICE: type reference T_TABLE1.C_COL1%TYPE converted to character
varying
--3) It says
CREATE OR REPLACE FUNCTION func1(INOUT var_1 "varchar", IN var_2 int4)
AS...
It kinda works but looks static, now I kinda wanted it to STAY %TYPE.
ALSO
--1) CREATE TYPE type1 AS (tvar_1 T_TABLE1.C_COL1%TYPE, tvar_2
INTEGER);
XX ERROR: syntax error at or near "%"
--2) CREATE TYPE type1 AS (tvar_1 T_TABLE1.C_COL1, tvar_2 INTEGER);
XX ERROR: schema "T_TABLE1" does not exist
I don't want to asign it at the ROW level just Column. I got this stuff
all over and need a good conversion solution.
Any help is appreciated...
Thanks
Troy
From | Date | Subject | |
---|---|---|---|
Next Message | Andrus | 2005-10-28 08:01:13 | Re: Why database is corrupted after re-booting |
Previous Message | Ron Mayer | 2005-10-28 06:26:32 | Re: Why database is corrupted after re-booting |