From: | Manuel Gómez <targen(at)gmail(dot)com> |
---|---|
To: | Thomas Munro <thomas(dot)munro(at)enterprisedb(dot)com> |
Cc: | david(at)andl(dot)org, PostgreSQL General <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Proper relational database? |
Date: | 2016-04-23 06:08:41 |
Message-ID: | CAJWnFaP65BmFSdt0SGrn7VimcdCVkTfte7zcnHFkO287b6PtTA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sat, Apr 23, 2016 at 12:05 AM, Thomas Munro
<thomas(dot)munro(at)enterprisedb(dot)com> 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)
From | Date | Subject | |
---|---|---|---|
Next Message | Guyren Howe | 2016-04-23 06:53:00 | Re: Proper relational database? |
Previous Message | Sameer Kumar | 2016-04-23 05:51:56 | Re: [NOVICE] Fwd: Process scheduling in postgres |