Re: Creating a VIEW with a POINT column

Поиск
Список
Период
Сортировка
От Nick
Тема Re: Creating a VIEW with a POINT column
Дата
Msg-id d354932e-774a-44cf-ac52-9c2c3d97f7bf@z32g2000prh.googlegroups.com
обсуждение исходный текст
Ответ на Creating a VIEW with a POINT column  (Nick <nboutelier@hotmail.com>)
Ответы Re: Creating a VIEW with a POINT column
Список pgsql-hackers
Nope, im not ordering by the POINT column. Heres an example...

CREATE TABLE table1 (   title character varying,   sorter integer,   xy point
);

CREATE TABLE table2 (   title character varying,   sorter integer,   xy point
);

INSERT INTO table1 VALUES ('one', 1, '(1,1)');
INSERT INTO table1 VALUES ('two', 2, '(2,2)');
INSERT INTO table1 VALUES ('three', 3, '(3,3)');
INSERT INTO table2 VALUES ('four', 4, '(4,4)');
INSERT INTO table2 VALUES ('five', 5, '(5,5)');
INSERT INTO table2 VALUES ('six', 6, '(6,6)');

CREATE VIEW myview AS   SELECT table1.title, table1.sorter, table1.xy FROM table1 UNION
SELECT table2.title, table2.sorter, table2.xy FROM table2;

SELECT title FROM myview ORDER BY sorter;

ERROR:  could not identify an ordering operator for type point
HINT:  Use an explicit ordering operator or modify the query.

In statement:
SELECT title FROM myview ORDER BY sorter


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: CVS Head psql bug?
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: CVS Head psql bug?