On Tue, Oct 31, 2006 at 11:45:00PM +0200, Volkan YAZICI wrote:
> > 
> > Note the column headers.  They're differently shaped.  Because
> > pseudotype record doesn't have a shape, equality doesn't make sense,
> > so you need two shapes that are already identical, so they can use
> > the matching rules for that.
> 
> Can you be more verbose please? I couldn't understand what you mean with
> "shape". 

It's an analogy, really.  The datatype numeric() for instance, is
determined.  Because it's determined, you can have determinate rules
for comparing one to another.

But the pseudotype record doesn't work that way.  It can accept
whatever you put in there, which is why you can define a variable as
type record, and then select from different tables (or even different
datatypes!) to it in plpgsql: it accommodates these different things. 
The trade-off is that comparing a record to another record won't
always work: because what a record is is not pre-determined, you
can't have determinate rules for comparing one record to another. 
And without determinate rules, you can't have an equality operator.

A

-- 
Andrew Sullivan  | [EMAIL PROTECTED]
This work was visionary and imaginative, and goes to show that visionary
and imaginative work need not end up well. 
                --Dennis Ritchie

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to