add_missing_from in 8.1

Started by Neil Conwayalmost 21 years ago10 messages
#1Neil Conway
neilc@samurai.com

I'd like to make add_missing_from=false the default for 8.1. Any objections?

I think the only reason not to do this is for backward compatibility
with previous releases of PostgreSQL, but I don't find that too
compelling: it is easy to fix up queries that rely on the old behavior,
and the old behavior if not compliant with the SQL spec. Also, the admin
can always enable add_missing_from locally if they can't afford to
update their applications. Per usual, we should mention the change
prominently in the "Incompatibilities" section of the release notes.

Barring any objections, I'll send in a patch that implements this soon.

-Neil

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#1)
Re: add_missing_from in 8.1

Neil Conway <neilc@samurai.com> writes:

I'd like to make add_missing_from=false the default for 8.1. Any objections?

We still don't have a solution for DELETE, do we?

regards, tom lane

#3Euler Taveira de Oliveira
eulerto@yahoo.com.br
In reply to: Tom Lane (#2)
Re: add_missing_from in 8.1

Hi,

I'd like to make add_missing_from=false the default for 8.1. Any

objections?

We still don't have a solution for DELETE, do we?

Are you talking about DELETE FROM bar USING foo ? I submitted a patch
some months ago.
http://archives.postgresql.org/pgsql-patches/2004-12/msg00169.php
And IIRC I could be fine if we just disable add_missing_from like Neil
suggest because if someone write the join incorrectly i'll lead to
exclude all rows in the table.

Euler Taveira de Oliveira
euler[at]yahoo_com_br

Yahoo! Acesso Gr�tis - Internet r�pida e gr�tis.
Instale o discador agora! http://br.acesso.yahoo.com/

#4Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Euler Taveira de Oliveira (#3)
Re: add_missing_from in 8.1

Euler Taveira de Oliveira wrote:

Hi,

I'd like to make add_missing_from=false the default for 8.1. Any

objections?

We still don't have a solution for DELETE, do we?

Are you talking about DELETE FROM bar USING foo ? I submitted a patch
some months ago.
http://archives.postgresql.org/pgsql-patches/2004-12/msg00169.php
And IIRC I could be fine if we just disable add_missing_from like Neil
suggest because if someone write the join incorrectly i'll lead to
exclude all rows in the table.

Wow, seems I lost that somehow. I don't see it the 8.1 patches queue.
Let me add this email now so I don't lose it.

-- 
  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
#5Neil Conway
neilc@samurai.com
In reply to: Bruce Momjian (#4)
Re: add_missing_from in 8.1

Bruce Momjian wrote:

Wow, seems I lost that somehow.

BTW, I personally think it is fine for patch submitters to send "ping"
mails if your patch is not applied or reviewed within a reasonable
period of time -- this is standard practice among the GCC community,
for example. I certainly have a tendency to lose track of the status of
the various outstanding patches.

-Neil

#6Bruce Momjian
pgman@candle.pha.pa.us
In reply to: Neil Conway (#5)
Re: add_missing_from in 8.1

Neil Conway wrote:

Bruce Momjian wrote:

Wow, seems I lost that somehow.

BTW, I personally think it is fine for patch submitters to send "ping"
mails if your patch is not applied or reviewed within a reasonable
period of time -- this is standard practice among the GCC community,
for example. I certainly have a tendency to lose track of the status of
the various outstanding patches.

Agreed, but I shouldn't have lost it. They shouldn't _need_ to ping,
and if they do, I hope I can saw we have it, rather than I don't. :-(

-- 
  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
#7Neil Conway
neilc@samurai.com
In reply to: Euler Taveira de Oliveira (#3)
Re: add_missing_from in 8.1

Euler Taveira de Oliveira wrote:

Are you talking about DELETE FROM bar USING foo ? I submitted a patch
some months ago.

At a quick glance, looks pretty good. It needs regression tests, and I'd
also like to refactor the analyze.c additions to use the same code
UPDATE uses for the tlist transformation. I'll review and apply this
weekend.

-Neil

#8Tom Lane
tgl@sss.pgh.pa.us
In reply to: Neil Conway (#7)
Re: add_missing_from in 8.1

Neil Conway <neilc@samurai.com> writes:

Euler Taveira de Oliveira wrote:

Are you talking about DELETE FROM bar USING foo ? I submitted a patch
some months ago.

At a quick glance, looks pretty good. It needs regression tests, and I'd
also like to refactor the analyze.c additions to use the same code
UPDATE uses for the tlist transformation. I'll review and apply this
weekend.

Huh? DELETE hasn't got a tlist to transform ...

regards, tom lane

#9Neil Conway
neilc@samurai.com
In reply to: Tom Lane (#8)
Re: add_missing_from in 8.1

Tom Lane wrote:

Huh? DELETE hasn't got a tlist to transform ...

Yeah -- on looking closer, the patch copied and pasted a bunch of tlist
transformation code from UPDATE, but AFAICS there is no need for it.

-Neil

#10Neil Conway
neilc@samurai.com
In reply to: Neil Conway (#1)
Re: add_missing_from in 8.1

Neil Conway wrote:

I'd like to make add_missing_from=false the default for 8.1. Any
objections?

FYI, I've applied a patch that makes this change to CVS HEAD.

-Neil