Jan Wieck JanWieck at Yahoo.com
Thu Jun 21 08:22:48 PDT 2007
On 6/20/2007 10:32 AM, Christopher Browne wrote:
> The log shipping test (and only the log shipping test) fails on v7.4,
> which seems to be attributable to the (obvious) syntax error seen
> below.
> 
> In the file for the ".y22679" test, generated with PG 7.4, there is no
> "\." in the dump file that is used to set up log shipping.
> 
> In the other one (from a test of v8.1), the "\." is present.
> 
> 
> cbbrowne at dba2:/tmp> diff  -b slony-regress.w10354/logship_dump.sql slony-regress.y22679/logship_dump.sql 
> 101a102
>> \.
> cbbrowne at dba2:/tmp> tail slony-regress.w10354/logship_dump.sql slony-regress.y22679/logship_dump.sql 
> ==> slony-regress.w10354/logship_dump.sql <==
> 	raise notice ''Slony-I: Process set % sync % time %'', p_set_id, p_new_seq, p_sync_time;
> 
> 	update "_slony_regress1".sl_setsync_offline set ssy_seqno = p_new_seq, ssy_synctime = p_sync_time
> 		where ssy_setid = p_set_id;
> 	return p_new_seq;
> end;
> ' language plpgsql;
> 
> copy "_slony_regress1".sl_sequence_offline from stdin;
> commit;
> 
> ==> slony-regress.y22679/logship_dump.sql <==
> 
> 	update "_slony_regress1".sl_setsync_offline set ssy_seqno = p_new_seq, ssy_synctime = p_sync_time
> 		where ssy_setid = p_set_id;
> 	return p_new_seq;
> end;
> ' language plpgsql;
> 
> copy "_slony_regress1".sl_sequence_offline from stdin;
> \.
> commit;
> 
> Unfortunately, I think this is attributable to Stephane Schildkneckt's
> recent change to the following that added the leading 'E':
> 
>     printf "select E'\\\\\\\\.';"
> 
> Can we verify that this usage breaks in PG 7.4?  I expect I need to
> revert this change.  (Sorry, Stephane!)

Sure does, because there was no E'string' syntax in 7.4. The use of this 
must be backend version dependent. Since this is coming from a client 
that might connect to remote servers which are allowed to run on 
different Postgres version than the one, this client was compiled 
against, I think the only correct solution is to determine the version 
at runtime and act accordingly.


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 #


More information about the Slony1-bugs mailing list