"Adding missing from clause"
PG Folks,
Could we have a .conf option to turn OFF the "Adding Missing From Clause for
Table ... "? I'd far rather have a fatal query error than have Postgres
automatically insert the tables it thinks I wanted. This automated adding in
tables also seems very inconsistent with Postgres' dedication to accuracy
above all.
Apologies if this is already taken care of in 7.4.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
Josh Berkus <josh@agliodbs.com> writes:
Could we have a .conf option to turn OFF the "Adding Missing From Clause for
Table ... "?
No objection here. Send a patch.
regards, tom lane
At 02:36 PM 29/04/2003 -0700, Josh Berkus wrote:
I'd far rather have a fatal query error than have Postgres
automatically insert the tables it thinks I wanted
I too would dearly like to see this.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/
On Tue, 29 Apr 2003, Tom Lane wrote:
Josh Berkus <josh@agliodbs.com> writes:
Could we have a .conf option to turn OFF the "Adding Missing From Clause for
Table ... "?No objection here. Send a patch.
I presume from this just turning it into an error would attract objection and
as I haven't seen a patch for this come through the lists I've attached one
doing:
* Add enable_implicited_join GUC, defaulting to true. Emit notice if
enabled, throw error if disabled when adding implicit RTE.
--
Nigel J. Andrews
Attachments:
enable_implicit_join.patchtext/plain; charset=US-ASCII; name=enable_implicit_join.patchDownload+38-3
"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
* Add enable_implicited_join GUC, defaulting to true. Emit notice if
enabled, throw error if disabled when adding implicit RTE.
I'd call it "enable_implicit_from", I think, but otherwise this seems
reasonable...
regards, tom lane
Nigel,
I presume from this just turning it into an error would attract objection
and as I haven't seen a patch for this come through the lists I've attached
one doing:
Darn, that was fast. I was going to tackle this next week; now I don't have
to.
Grazie mille!
--
Josh Berkus
Aglio Database Solutions
San Francisco
On Thu, 1 May 2003, Tom Lane wrote:
"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
* Add enable_implicited_join GUC, defaulting to true. Emit notice if
enabled, throw error if disabled when adding implicit RTE.I'd call it "enable_implicit_from", I think, but otherwise this seems
reasonable...
Fair enough, I'm not particularly sold on my choice so here's a replacement
patch with the GUC name changed. If there's a problem it'll probably be because
I edited the patch and not the source.
Log:
* Add enable_implicit_from GUC, defaulting to true. Emit notice if
enabled, throw error if disabled when adding implicit RTE.
--
Nigel J. Andrews
Someone slap me, here's the patch attached this time...
On Thu, 1 May 2003, Nigel J. Andrews wrote:
On Thu, 1 May 2003, Tom Lane wrote:
"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
* Add enable_implicited_join GUC, defaulting to true. Emit notice if
enabled, throw error if disabled when adding implicit RTE.I'd call it "enable_implicit_from", I think, but otherwise this seems
reasonable...Fair enough, I'm not particularly sold on my choice so here's a replacement
patch with the GUC name changed. If there's a problem it'll probably be because
I edited the patch and not the source.Log:
* Add enable_implicit_from GUC, defaulting to true. Emit notice if
enabled, throw error if disabled when adding implicit RTE.
--
Nigel J. Andrews
Attachments:
enable_implicit_join.patchtext/plain; charset=US-ASCII; name=enable_implicit_join.patchDownload+38-3
Added to TODO:
* Add config variable to prevent auto-adding missing FROM-clause
tables
---------------------------------------------------------------------------
Philip Warner wrote:
At 02:36 PM 29/04/2003 -0700, Josh Berkus wrote:
I'd far rather have a fatal query error than have Postgres
automatically insert the tables it thinks I wantedI too would dearly like to see this.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Your patch has been added to the PostgreSQL unapplied patches list at:
http://momjian.postgresql.org/cgi-bin/pgpatches
I will try to apply it within the next 48 hours.
---------------------------------------------------------------------------
Nigel J. Andrews wrote:
On Thu, 1 May 2003, Tom Lane wrote:
"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
* Add enable_implicited_join GUC, defaulting to true. Emit notice if
enabled, throw error if disabled when adding implicit RTE.I'd call it "enable_implicit_from", I think, but otherwise this seems
reasonable...Fair enough, I'm not particularly sold on my choice so here's a replacement
patch with the GUC name changed. If there's a problem it'll probably be because
I edited the patch and not the source.Log:
* Add enable_implicit_from GUC, defaulting to true. Emit notice if
enabled, throw error if disabled when adding implicit RTE.--
Nigel J. Andrews---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
And patch now in queue. :-)
---------------------------------------------------------------------------
Bruce Momjian wrote:
Added to TODO:
* Add config variable to prevent auto-adding missing FROM-clause
tables---------------------------------------------------------------------------
Philip Warner wrote:
At 02:36 PM 29/04/2003 -0700, Josh Berkus wrote:
I'd far rather have a fatal query error than have Postgres
automatically insert the tables it thinks I wantedI too would dearly like to see this.
----------------------------------------------------------------
Philip Warner | __---_____
Albatross Consulting Pty. Ltd. |----/ - \
(A.B.N. 75 008 659 498) | /(@) ______---_
Tel: (+61) 0500 83 82 81 | _________ \
Fax: (+61) 03 5330 3172 | ___________ |
Http://www.rhyme.com.au | / \|
| --________--
PGP key available upon request, | /
and from pgp5.ai.mit.edu:11371 |/---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 359-1001 + If your life is a hard drive, | 13 Roberts Road + Christ can be your backup. | Newtown Square, Pennsylvania 19073---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
I have applied the following patch, which does make a few adjustments.
I called the variable add_missing_from, rather than
enable_implicit_from. The former seemed clearer.
I also enhanced the documentation for the item.
I added comments for the End-of-list records.
Does someone want to make an argument that this variable should default
to false rather than true, for standards compliance?
---------------------------------------------------------------------------
Nigel J. Andrews wrote:
On Thu, 1 May 2003, Tom Lane wrote:
"Nigel J. Andrews" <nandrews@investsystems.co.uk> writes:
* Add enable_implicited_join GUC, defaulting to true. Emit notice if
enabled, throw error if disabled when adding implicit RTE.I'd call it "enable_implicit_from", I think, but otherwise this seems
reasonable...Fair enough, I'm not particularly sold on my choice so here's a replacement
patch with the GUC name changed. If there's a problem it'll probably be because
I edited the patch and not the source.Log:
* Add enable_implicit_from GUC, defaulting to true. Emit notice if
enabled, throw error if disabled when adding implicit RTE.--
Nigel J. Andrews---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachments:
/bjm/difftext/plainDownload+46-15
Bruce,
Does someone want to make an argument that this variable should default
to false rather than true, for standards compliance?
No. As much as I would like it to default to FALSE, we need to maintain
backward compatibility for one release. We can change the default in
7.5/8.0.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
Josh Berkus <josh@agliodbs.com> writes:
Does someone want to make an argument that this variable should default
to false rather than true, for standards compliance?
No. As much as I would like it to default to FALSE, we need to maintain
backward compatibility for one release. We can change the default in
7.5/8.0.
Much further out than that.
regards, tom lane