Difference Between record and rowtype

Started by Volkan YAZICIover 19 years ago2 messages
#1Volkan YAZICI
yazicivo@ttnet.net.tr

Hi,

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

Regards.

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Volkan YAZICI (#1)
Re: Difference Between record and rowtype

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