On Tue, Oct 31, 2006 at 11:58:08PM +0200, Volkan YAZICI wrote: > On Oct 31 06:49, Alvaro Herrera wrote: > > > select > > > (select (1,2)) > > > is distinct from > > > (select (1,2)) > > > ;
> > alvherre=# select > > row(1,2) > > is distinct from > > row(1,2) > > What's the difference between "SELECT (1, 2);" and "SELECT ROW(1, 2);"? It's not the difference between SELECT (1,2) and SELECT ROW(1,2) that's relevant, but the difference between SELECT (SELECT (1,2)) and SELECT ROW(1,2). The row's datatype(s) is(are) defined. The record's datatype isn't. So you can have an equality operator for the row. You can see this from the error message when you do this: testing=# SELECT ROW(1,2) is distinct from ROW ('a','b'); ERROR: invalid input syntax for integer: "a" This is part of the subtle difference between the record and row datatypes. A -- Andrew Sullivan | [EMAIL PROTECTED] The plural of anecdote is not data. --Roger Brinner ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings