Thread: Difference Between record and rowtype

Difference Between record and rowtype

From
Volkan YAZICI
Date:
Hi,

What's [the difference between] a record (which is a pseudo 'p' type) and
a rowtype (which's a complex 'c' type).


Regards.


Re: Difference Between record and rowtype

From
Tom Lane
Date:
Volkan YAZICI <yazicivo@ttnet.net.tr> writes:
> What's [the difference between] a record (which is a pseudo 'p' type) and
> a rowtype (which's a complex 'c' type).

The main difference is that you can't declare a table column as having
a pseudotype.  RECORD is restricted to uses where the system can
determine the specific row type from context, whereas a 'c' type is
effectively self-contained and will work anywhere.
        regards, tom lane