Re: record datatype comparisons

Поиск
Список
Период
Сортировка
От Andrew Sullivan
Тема Re: record datatype comparisons
Дата
Msg-id 20061031212253.GD20809@phlogiston.dyndns.org
обсуждение исходный текст
Ответ на record datatype comparisons  ("George Pavlov" <gpavlov@mynewplace.com>)
Ответы Re: record datatype comparisons
Re: record datatype comparisons
Список pgsql-sql
On Tue, Oct 31, 2006 at 12:38:36PM -0800, George Pavlov wrote:
> Both (1::int,'a'::varchar) and (select (2::int,'a'::varchar)) are of
> type record, aren't they?

I don't think so.  Psql gives you a hint that not:

testing=# SELECT (1::int, 'a'::varchar); row  
-------(1,a)
(1 row)

testing=# SELECT (SELECT(1::int, 'a'::varchar));?column? 
----------(1,a)
(1 row)

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.

A

-- 
Andrew Sullivan  | ajs@crankycanuck.ca
Everything that happens in the world happens at some place.    --Jane Jacobs 


В списке pgsql-sql по дате отправления:

Предыдущее
От: Andrew Sullivan
Дата:
Сообщение: Re: Round Numeric Type
Следующее
От: "George Pavlov"
Дата:
Сообщение: Re: record datatype comparisons