Re: Slick way to update multiple tables.

2021-04-03 Thread Ron
On 4/1/21 11:16 AM, Theodore M Rolle, Jr. wrote: I SELECT items from three tables. It seems that the only way to put updated fields into their proper table is to query /each/ field, then UPDATE /each/ table. Am I missing something here? Is there a way to do this automatically? Did you join

Re: Slick way to update multiple tables.

2021-04-01 Thread Paul Jungwirth
On 4/1/21 11:54 AM, Michael Lewis wrote: postgresql.org/docs/current/sql-createview.html My apologies. It seems INSTEAD OF triggers are required to implement updates across multiple tables. I thought not if all were simple joins. My mis

Re: Slick way to update multiple tables.

2021-04-01 Thread Michael Lewis
postgresql.org/docs/current/sql-createview.html My apologies. It seems INSTEAD OF triggers are required to implement updates across multiple tables. I thought not if all were simple joins. My mistake.

Re: Slick way to update multiple tables.

2021-04-01 Thread Michael Lewis
Joins are allowed though.

Re: Slick way to update multiple tables.

2021-04-01 Thread Theodore M Rolle, Jr.
On Thu, Apr 1, 2021 at 12:43 PM Michael Lewis wrote: > You can have an updatable view. > *Show-stopper?* The defining query of the view must have exactly one entry in the FROM clause, which can be a table or another updatable view. Or multiple VIEWs? I've never done VIEWs... -- GnuPG/PGP ke

Re: Slick way to update multiple tables.

2021-04-01 Thread Michael Lewis
You can have an updatable view.

Slick way to update multiple tables.

2021-04-01 Thread Theodore M Rolle, Jr.
I SELECT items from three tables. It seems that the only way to put updated fields into their proper table is to query *each* field, then UPDATE *each* table. Am I missing something here? Is there a way to do this automatically? -- GnuPG/PGP key: 0xDD4276BA +-