Обсуждение: Difference Between record and rowtype

Поиск
Список
Период
Сортировка

Difference Between record and rowtype

От
Volkan YAZICI
Дата:
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

От
Tom Lane
Дата:
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