Re: CREATE TYPE and %ROWTYPE - Mailing list pgsql-novice

From Steve Tucknott
Subject Re: CREATE TYPE and %ROWTYPE
Date
Msg-id 1112948729.1296.20.camel@retsol1
Whole thread Raw
In response to Re: CREATE TYPE and %ROWTYPE  (Steve Tucknott <steve@retsol.co.uk>)
Responses Re: CREATE TYPE and %ROWTYPE
List pgsql-novice
Tom,

Can I also clarify:
If I want to return a record area (row) from a table I cannot use:
RETURNS RECORD or
RETURNS tableName%ROWTYPE

But I can return a record area (row) If I first define the row as a
custom type then use:
RETURNS customType

Am I missing something here? Why do I need to define a custom type to
return a row?

What I am trying to do is to define a set of standard lookups in the
database that return the complete record area of the table(s) being
queried.

On Fri, 2005-04-08 at 08:01, Steve Tucknott wrote:
> Tom,
> Is there another trick that I'm missing? Is there a simple way of
> returning two complete record areas without using custom types?
> On Fri, 2005-04-08 at 07:51, Tom Lane wrote:
> > Steve Tucknott <steve@retsol.co.uk> writes:
> > > Before I go too far, has anyone got any ideas on this?
> >
> > IIRC, we only support %ROWTYPE with function parameters.  I don't think
> > anyone's thought about what it would take to use it in other contexts
> > such as columns of composite types.  It might be trivial ... or not.
> >
> >             regards, tom lane
> --
>
>
> Regards,
>
> Steve Tucknott
> ReTSol Ltd
>
> DDI    01903 828769
> MOBILE    07736715772
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
--


Regards,

Steve Tucknott
ReTSol Ltd

DDI    01903 828769
MOBILE    07736715772



pgsql-novice by date:

Previous
From: Steve Tucknott
Date:
Subject: Re: CREATE TYPE and %ROWTYPE
Next
From: Steve Tucknott
Date:
Subject: Re: CREATE TYPE and %ROWTYPE