Jan Wieck JanWieck
Mon Oct 11 14:39:38 PDT 2004
On 10/10/2004 12:13 AM, elein wrote:

> I hate to throw this in, but text comparisons of data types
> which do not have equal operators are not necessarily correct.
> In fact it is possibly arbitrary depending on the data type.

I said "string comparision of the external representation". By 
definition the typout function must produce a C string that if fed into 
the typin function leads to a logically equal binary datum. Otherwise 
the datatype is not even a candidate for a backup via pg_dump - in which 
case I couldn't care less about Slony support for it.


Jan

> 
> Arguing against myself, now, the text comparison might 
> signal that the value changed to something that may or
> may not be equal to the previous value and therefore 
> text compare is still a good test for this purpose.
> 
> --elein
> 
> On Wed, Oct 06, 2004 at 11:04:25AM -0400, Jan Wieck wrote:
>> On 10/6/2004 9:46 AM, Jan Wieck wrote:
>> 
>> >I was able to reproduce a similar core by using a simple user defined 
>> >data type that has no comparision operators at all - just input and 
>> >output functions and nothing else. Slony does not have such data type. 
>> >The xxid type coming with it is a full blown type that even comes with 
>> >an opclass for indexing. But tsearch2 has a few of those critters. Could 
>> >it be that after uninstalling Slony, you also uninstalled and eventually 
>> >reinstalled tsearch2 in that database?
>> >
>> >However, this is a serious bug since user defined tyes without any 
>> >operators are of course legal in Postgres and have to be supported by 
>> >Slony. I am working on a fix for it.
>> 
>> This is fixed in REL_1_0_STABLE and HEAD, so it will be included in the 
>> upcoming version 1.0.3.
>> 
>> The fix will fallback to compare the external string representation 
>> returned by SPIgetvalue() if it cannot determine an "=" operator for the 
>> data type. This will automatically cover array attributes as well. For 
>> version 1.1 we might want to change this again to use array_eq() instead 
>> if there is an equal operator for the array elements data type.
>> 
>> 
>> Jan
>> 
>> -- 
>> #======================================================================#
>> # It's easier to get forgiveness for being wrong than for being right. #
>> # Let's break this rule - forgive me.                                  #
>> #================================================== JanWieck at Yahoo.com #
>> _______________________________________________
>> Slony1-general mailing list
>> Slony1-general at gborg.postgresql.org
>> http://gborg.postgresql.org/mailman/listinfo/slony1-general


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #


More information about the Slony1-general mailing list