Skip to content
Browse files

Try again for a unique var name

  • Loading branch information...
1 parent 6ba621a commit a0b01befdc8e0b4404732275e7195f155c69a798 @turnstep turnstep committed Apr 18, 2012
Showing with 7 additions and 7 deletions.
  1. +7 −7 bucardo.schema
View
14 bucardo.schema
@@ -1532,26 +1532,26 @@ END;
SECURITY DEFINER
AS \$clone\$
DECLARE
- tablename TEXT;
+ mytable TEXT;
myst TEXT;
BEGIN
INSERT INTO bucardo.bucardo_truncate_trigger(tablename,sname,tname,sync)
VALUES (TG_RELID, TG_TABLE_SCHEMA, TG_TABLE_NAME, TG_ARGV[0]);
- SELECT INTO tablename
+ SELECT INTO mytable
bucardo.bucardo_tablename_maker(TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, 'delta_');
- myst = 'TRUNCATE TABLE bucardo.' || tablename;
+ myst = 'TRUNCATE TABLE bucardo.' || mytable;
EXECUTE myst;
- SELECT INTO tablename
+ SELECT INTO mytable
bucardo.bucardo_tablename_maker(TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, 'track_');
- myst = 'TRUNCATE TABLE bucardo.' || tablename;
+ myst = 'TRUNCATE TABLE bucardo.' || mytable;
EXECUTE myst;
-- Not strictly necessary, but nice to have a clean slate
- SELECT INTO tablename
+ SELECT INTO mytable
bucardo.bucardo_tablename_maker(TG_TABLE_SCHEMA || '.' || TG_TABLE_NAME, 'stage_');
- myst = 'TRUNCATE TABLE bucardo.' || tablename;
+ myst = 'TRUNCATE TABLE bucardo.' || mytable;
EXECUTE myst;
RETURN NEW;

0 comments on commit a0b01be

Please sign in to comment.
Something went wrong with that request. Please try again.