Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-03-31 Thread Bruce Momjian
On Wed, Mar 18, 2020 at 12:24:45PM -0400, Bruce Momjian wrote: > On Tue, Mar 17, 2020 at 10:58:54PM -0400, Tom Lane wrote: > > Bruce Momjian writes: > > > I have implemented the ideas above in the attached patch. I have > > > synchronized the syntax to match SELECT, and synchronized the paragraph

Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-03-18 Thread David G. Johnston
On Wednesday, March 18, 2020, Tom Lane wrote: > Bruce Momjian writes: > > OK, updated patch attached. > > LGTM, thanks > +1 David J.

Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-03-18 Thread Tom Lane
Bruce Momjian writes: > OK, updated patch attached. LGTM, thanks. regards, tom lane

Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-03-18 Thread Bruce Momjian
On Tue, Mar 17, 2020 at 10:58:54PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > I have implemented the ideas above in the attached patch. I have > > synchronized the syntax to match SELECT, and synchronized the paragraphs > > describing the item. > > I think that the DELETE synopsis should

Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-03-17 Thread Tom Lane
Bruce Momjian writes: > I have implemented the ideas above in the attached patch. I have > synchronized the syntax to match SELECT, and synchronized the paragraphs > describing the item. I think that the DELETE synopsis should look like [ USING from_item [, ...] ] so that there's not any q

Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-03-17 Thread Bruce Momjian
On Thu, Feb 13, 2020 at 11:26:45AM -0500, Tom Lane wrote: > I see where you're coming from, but I do not think that repeating the > whole from_item syntax in UPDATE and DELETE is the best way forward. > In the first place, we'd inevitably forget to update those copies, > and in the second, I'm not

Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-02-13 Thread David G. Johnston
On Thu, Feb 13, 2020 at 9:26 AM Tom Lane wrote: > "David G. Johnston" writes: > > On Thu, Feb 13, 2020 at 4:13 AM Alexey Bashtanov > wrote: > >> Please could someone have a look at the patch attached? > >> It's not just pedantry but rather based on a real-life example of > >> someone reading an

Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-02-13 Thread Tom Lane
"David G. Johnston" writes: > On Thu, Feb 13, 2020 at 4:13 AM Alexey Bashtanov wrote: >> Please could someone have a look at the patch attached? >> It's not just pedantry but rather based on a real-life example of >> someone reading and being not sure >> whether e.g. joins can be used in there.

Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-02-13 Thread David Fetter
On Thu, Feb 13, 2020 at 11:13:32AM +, Alexey Bashtanov wrote: > Hello, > > Currently the documentation says that one can put "a list of table > expressions" > after FROM in UPDATE or after USING in DELETE. > However, "table expression" is defined as a complex of > FROM, WHERE, GROUP BY and HAV

Re: Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-02-13 Thread David G. Johnston
On Thu, Feb 13, 2020 at 4:13 AM Alexey Bashtanov wrote: > Hello, > > Currently the documentation says that one can put "a list of table > expressions" > after FROM in UPDATE or after USING in DELETE. > However, "table expression" is defined as a complex of > FROM, WHERE, GROUP BY and HAVING claus

Small docs bugfix: make it clear what can be used in UPDATE FROM and DELETE USING

2020-02-13 Thread Alexey Bashtanov
Hello, Currently the documentation says that one can put "a list of table expressions" after FROM in UPDATE or after USING in DELETE. However, "table expression" is defined as a complex of FROM, WHERE, GROUP BY and HAVING clauses [1]. The thing one can list in the FROM clause in a comma-separat