Re: Tablename.columnname%TYPE in Types On PostgreSQL 9.2 - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Tablename.columnname%TYPE in Types On PostgreSQL 9.2
Date
Msg-id A737B7A37273E048B164557ADEF4A58B057DAE9C@ntex2010i.host.magwien.gv.at
Whole thread Raw
In response to Tablename.columnname%TYPE in Types On PostgreSQL 9.2  (Adrien Besson <a.besson04@gmail.com>)
List pgsql-general
Adrien Besson wrote:
> Trying to create a type using %Type seems not to work on PostgreSQL 9.2:
>
>  CREATE TYPE type1 AS (tvar_1 TABLE1. COL1%TYPE , tvar_2 INTEGER);
>
> Returns
>
> XX ERROR:  syntax error at or near "%"
>
> Where am I wrong ? Someone has an idea ?

I think that the %TYPE syntax is PL/pgSQL only.

Yours,
Laurenz Albe


pgsql-general by date:

Previous
From: Greg Williamson
Date:
Subject: Re: Queries seldomly take >4s while normally take <1ms?
Next
From: Christian Hammers
Date:
Subject: Re: Queries seldomly take >4s while normally take <1ms?