From: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
---|---|
To: | Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com> |
Cc: | Joel Jacobson <joel(at)trustly(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Schema version management |
Date: | 2012-07-05 13:21:04 |
Message-ID: | CAD5tBcKOSQ+TvibcMXjAoBo5M_J0E08hZQSq1-25MFx7C6c=Nw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Jul 5, 2012 at 4:04 AM, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>wrote:
> On Thu, Jul 5, 2012 at 3:15 AM, Joel Jacobson <joel(at)trustly(dot)com> wrote:
>
>> On Thu, Jul 5, 2012 at 2:38 AM, Robert Haas <robertmhaas(at)gmail(dot)com>wrote:
>>
>>> My vote is - when there's an overloaded function, put each version in
>>> its own file. And name the files something like
>>> functionname_something.sql. And just document that something may not
>>> be entirely stable.
>>
>>
>> I would agree that's better if the dump order isn't deterministic.
>>
>> However, it looks like an easy fix to make the dump order deterministic:
>> http://archives.postgresql.org/pgsql-hackers/2012-07/msg00232.php
>>
>> If the dump order is deterministic, I think its cleaner to put all
>> versions in the same file.
>>
>> Benefits:
>> + Pretty looking filename
>> + Same file structure for all object types, no special exception for
>> functions
>>
>
> I think there's a merit to keeping all overloaded variations of a function
> in a single file, apart from the simplicity and benefits noted above. A
> change in one variation of the function may also be applicable to other
> variations, say in bug-fixes or enhancements. So keeping all variations in
> one file would make sense, since it is logically one object.
>
No they are not necessarily one logical unit. You could have a bunch of
functions called, say, "equal" which have pretty much nothing to do with
each other, since they refer to different types.
+1 from me for putting one function definition per file.
cheers
andrew
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Glaesemann | 2012-07-05 13:32:42 | Re: Schema version management |
Previous Message | Joel Jacobson | 2012-07-05 13:07:10 | Re: [PATCH] pg_dump: Sort overloaded functions in deterministic order |