Search Postgresql Archives

Re: Proper relational database?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Apr 23, 2016 at 12:05 AM, Thomas Munro
<thomas.munro@xxxxxxxxxxxxxxxx> wrote:
> FWIW standard SQL may not allow it but Postgres does, and it's even
> possible to exclude duplicates by using an expression that references
> the whole row.

Indeed, but its semantics can be rather wonky.  Witness:

postgres=# select 1;
 ?column?
----------
        1
(1 row)

postgres=# select 1 union select 1;
 ?column?
----------
        1
(1 row)

postgres=# select;
--
(1 row)

postgres=# select union select;
--
(2 rows)

postgres=# select 1 intersect select 1;
 ?column?
----------
        1
(1 row)

postgres=# select intersect select;
--
(2 rows)


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux