Re: TODO question - Mailing list pgsql-hackers

From Pavlo Baron
Subject Re: TODO question
Date
Msg-id 007801c1c746$ce0ad8a0$6500a8c0@bw1
Whole thread Raw
In response to Re: TODO question  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: TODO question
List pgsql-hackers
Tom Lane wrote:

> I don't like it.  As given, it inserts default values into the query
> at parse time, whereas this must not be done until planning time.
> (Otherwise the defaults sneak into stored rules, and if you change
> defaults with ALTER TABLE you will get unexpected results.)  The

:(
But of course you are right - my solution was just a hack to learn about the
internals and I really didn't expect my first patch to be accepted.

> correct (and actually easier) way is to simply drop the defaulted column
> out of the analyzed query altogether.

I know what you mean.

>
> This is not Pavlo's fault exactly, since he copied the way we used
> to do it in 7.1 ... but the patch must be updated to follow 7.2
> practice.

I coudn't know about such details. But I see, my solution wasn't completely
wrong.

>
> Another problem: no copy/equal/outfuncs support for the added node type.

Is it also interesting in the case of the DEFAULT-pair being droped?

>
> Stylistic issue: we should discourage people from putting their initials
> on every bit of code they touch.  The code will soon be unreadable if
> such becomes common practice.

Understandable. I don't want to immortalize my initials in a foreign work.
My comments where a kind of orientaition marks for me to quickly find my own
code. As you know, I just wanted to know if I'm on the right way
experimenting with this TODO-issue.

Sorry, but I don't think I should provide this patch. I really haven't
enough energy and time to become an internals-GURU. This software is too
mighty and it's internals contain too many special thoughts of it's core
developers, so I would never get a required motivation to participate the
kernal development.
What I'll look for in the next time is what I wanted to do at the beginning
of my postgresql-dev-adventure. I'm developing very complex applications
based on Oracle. IMHO, it's an expensive and overheaded colossus, so Pg is
my absolute favorite when I develop a low cost web-based-solution for smb. w
ho don't want (or can't) pay a sack of money for the database.
Ross J. Reedstrom pointed me to the developer group working on the
Oracle-related issues. So I'll contact those guys to discuss some ideas I've
got after working with both Pg and Oracle.

BTW, here's smth. really funny about that TODO issue: smb. sent me an
SQL-script containig inserts using that "default" placeholder, and my
modified Pg-version did it! But now, I use the stable without my
modifications.

rgds
Pavlo Baron



pgsql-hackers by date:

Previous
From: Fernando Nasser
Date:
Subject: Re: Do FROM items of different schemas conflict?
Next
From: Tom Lane
Date:
Subject: Re: TODO question