Re: CREATE TYPE and %ROWTYPE

Поиск
Список
Период
Сортировка
От Steve Tucknott
Тема Re: CREATE TYPE and %ROWTYPE
Дата
Msg-id 1112943112.1232.6.camel@retsol1
обсуждение исходный текст
Ответ на CREATE TYPE and %ROWTYPE  (Steve Tucknott <steve@retsol.co.uk>)
Ответы Re: CREATE TYPE and %ROWTYPE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Before I go too far, has anyone got any ideas on this?

On Sun, 2005-04-03 at 14:18, Steve Tucknott wrote:
> (Sorry if this appears twice - I sent the previous mail as the wrong
> mail ID)
>
> PostgreSQL 7.4.5
>
> Is there a way of using %ROWTYPE in custom types?
> I want to return two/three complete record areas to a calling 4gl
> program.
> I can define a custom type, ie:
> CREATE TYPE myTest AS (
> fld1      INTEGER,
> fld2      VARCHAR,
> fld3       .......etc
> );
> This works fine. But if I define:
> CREATE TYPE myTest AS (
> area1              tableName1%ROWTYPE,
> area2              tableName2%ROWTYPE
> );
> I get an error. This then means that I have to define myTest with the
> individual fields (which I can do) - but which in turn means that if the
> tables change, I have to remember to change the procs.
>
>
>
> Regards,
>
> Steve Tucknott
>
> ReTSol Ltd
>
> DDI: 01903 828769
>
--


Regards,

Steve Tucknott
ReTSol Ltd

DDI    01903 828769
MOBILE    07736715772



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Getting running totals
Следующее
От: Tom Lane
Дата:
Сообщение: Re: CREATE TYPE and %ROWTYPE