On 2021-Dec-27, Joel Jacobson wrote: > >On Mon, Dec 27, 2021, at 15:48, Isaac Morland wrote: > >I thought the proposal was to give the FK constraint name. > >However, if the idea now is to allow leaving that out also if there > >is only one FK, then that's also OK as long as people understand it can > >break in the same way NATURAL JOIN can break > >when columns are added later. For that matter, a join mentioning column > >names can break if the columns are changed. But > >breakage where the query no longer compiles are better than ones where it > >suddenly means something very different so > >overall I wouldn't worry about this too much. > > Yes, my proposal was indeed to give the FK constraint name. > I just commented on Corey's different proposal that instead specified FK > columns.
By way of precedent we have the ON CONFLICT clause, for which you can specify a constraint name or a list of columns. -- Álvaro Herrera 39°49'30"S 73°17'W — https://www.EnterpriseDB.com/ "Los trabajadores menos efectivos son sistematicamente llevados al lugar donde pueden hacer el menor daño posible: gerencia." (El principio Dilbert)