From: | Vik Fearing <vik(dot)fearing(at)dalibo(dot)com> |
---|---|
To: | "Karl O(dot) Pinc" <kop(at)meme(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Cc: | David Johnston <polobo(at)yahoo(dot)com> |
Subject: | Re: Doc Patch: Subquery section to say that subqueries can't modify data |
Date: | 2013-10-15 14:42:49 |
Message-ID: | 525D5469.8000604@dalibo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 08/06/2013 11:03 PM, Karl O. Pinc wrote:
> The attached documentation patch, doc-subqueries-v1.patch,
> applies against head.
>
> I wanted to document that subqueries can't modify data.
> This is mentioned in the documentation for SELECT and
> implied elsewhere but I was looking for something more
> than an 'in-passing' mention.
>
> (I wrote a bad query,
> modifying data in a subquery, couldn't recall where
> it was documented that you can't do this, and couldn't
> find the answer from the TOC or the index. Now that
> there's lots of statements with RETURNING clauses
> it's natural to want to use them in subqueries.)
Hello, I am (finally) reviewing this patch.
After reading your reasoning, David's rebuttal, and the patch itself;
I'm wondering if this is needed or wanted at all.
Supposing it is wanted, it creates more questions than it answers. The
two biggies are:
* In what other contexts can tabular subqueries be used?
* What are other ways of integrating data returned by data modification
statements?
On a superficial level I find the number of commas a bit clunky, and
"parentheses" is misspelled.
> The last 2 sentences of the first paragraph are
> something in the way of helpful hints and may not
> be appropriate, or even accurate. I've left them in
> for review.
I think the last sentence (of the first paragraph) is a bit much, but
the penultimate seems fine.
I'm attaching an updated patch that I think is an improvement but it's
still at a draft level and needs more copyediting. This new patch does
not attempt to answer the two questions above.
--
Vik
Attachment | Content-Type | Size |
---|---|---|
doc-subqueries-v2.patch | text/x-patch | 2.6 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2013-10-15 14:48:48 | Re: logical changeset generation v6.2 |
Previous Message | Andres Freund | 2013-10-15 14:40:54 | Re: Patch for reserved connections for replication users |