Re: ? bug pg 9.6
От | Dave Page |
---|---|
Тема | Re: ? bug pg 9.6 |
Дата | |
Msg-id | CA+OCxowLQdJEh__Gv8o9YE2ZCo=aQ3EzZnKQdGQ0xoNXk8iMdA@mail.gmail.com обсуждение исходный текст |
Ответ на | ? bug pg 9.6 ("alain bourgeois" <a.bourgeois@zetescards.be>) |
Ответы |
Re: ? bug pg 9.6
|
Список | pgadmin-support |
On Fri, Aug 25, 2017 at 1:00 PM, alain bourgeois <a.bourgeois@zetescards.be> wrote:
Table t1 (id int).
Using pg admin:
select id from t1 order by t1
=> I expected an error, but it works???????
As it does in psql:
postgres=# create table t1(id int);
CREATE TABLE
postgres=# select id from t1 order by t1;
id
----
(0 rows)
I suspect it's because you can order by anything in the select list, and as t1 is a type as well as a table (each table has a corresponding row type), it's seen as a row constructor.
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake
EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
В списке pgadmin-support по дате отправления: