| From: | geoff hoffman <geoff(at)rxmg(dot)com> |
|---|---|
| To: | marcelo <marcelo(dot)nicolet(at)gmail(dot)com> |
| Cc: | pgsql-general(at)lists(dot)postgresql(dot)org |
| Subject: | Re: Enforce primary key on every table during dev? |
| Date: | 2018-03-01 20:59:54 |
| Message-ID: | A14ADBFC-923C-4912-BBDA-A6C3532E47EA@rxmg.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
I found this thread very interesting.
A pivot table is a perfectly valid use case where a compound unique key on two or more columns performs the same function as a primary key without one.
I’m not nearly as familiar with Postgres as I am with MySQL (which is why I recently joined this list)... it may be possible to define a collection of tables as a primary key. But if only a unique key is specified in this case, everyone would still be ok with the result from a logic design standpoint.
I think Melvin, way up the thread, had the best answer- be the DBA and have a review process. Don’t let folks go adding tables as they like.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Adrian Klaver | 2018-03-01 21:00:16 | Re: Version upgrade: is restoring the postgres database needed? |
| Previous Message | Ron Johnson | 2018-03-01 20:59:25 | Re: Enforce primary key on every table during dev? |