| From: | Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr> | 
|---|---|
| To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> | 
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Joel Jacobson <joel(at)trustly(dot)com>, Vik Reykja <vikreykja(at)gmail(dot)com>, Michael Glaesemann <grzm(at)seespotcode(dot)net>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: Schema version management | 
| Date: | 2012-07-05 21:52:12 | 
| Message-ID: | m2obnt3mgj.fsf@2ndQuadrant.fr | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> However I am also against what seems to be the flow.  Normally, you
> don't write overloaded plpgsql functions such as "equal".  Case in
> point, the equality functions in core have funny names like "int4eq" and
> so on.  Instead, at least in my experience, the overloaded functions
> people seem to have in their databases are like do_stuff_to_foobars()
> and you have one version for foos and another one for bars.
+1
I too want to have my overloaded functions all in the same file, as much
as to have made that the only behavior in getddl.py:
https://github.com/dimitri/getddl
> If you're doing lots of equality functions, surely it would make more
> sense to package them up as an extension anyway along with all the other
> thingies you need for the type you're supposedly writing.  So it's a
> completely different market than what we're aiming at here.
+1
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> FWIW, I'm attracted to the all-similarly-named-functions-together
> method, mainly because it dodges the problem of how to encode a
> function's argument list into a filename.  However, we're being
> short-sighted to only think of functions here.  What about operators?
> Or casts?  Those don't have simple names either.
I would argue like Álvaro that when dealing with operators and casts
you're probably writing an extension already, and we're providing
another way to deal with that.
Regards,
-- 
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jan Urbański | 2012-07-05 21:54:26 | Re: Re: [COMMITTERS] pgsql: Fix mapping of PostgreSQL encodings to Python encodings. | 
| Previous Message | Dimitri Fontaine | 2012-07-05 21:31:32 | Re: Event Triggers reduced, v1 |