I'm having problem with Slony-I

From: "Renaud Fortier" <renaud(dot)fortier(at)fsaa(dot)ulaval(dot)ca>
To: <pgadmin-support(at)postgresql(dot)org>
Subject: I'm having problem with Slony-I
Date: 2006-03-21 19:01:34
Message-ID: 001c01c64d19$df9eb840$1caecb84@fsaa.ulaval.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi,

I installed a Slony-I cluster on a test database on my production server.
When I try to join this new cluster from my test database on my development
server, I always got this error:

----------------------------------------------

An error has occurred:

ERROR: syntax error at or near "$" at character 1959

----------------------------------------------

This is the SQL near the character 1959 (AS $_$):

----------------------------------------------

--

-- Name: add_missing_table_field(text, text, text, text); Type: FUNCTION;
Schema: _MY_Cluster; Owner: postgres

--

CREATE FUNCTION add_missing_table_field(text, text, text, text) RETURNS
boolean

AS $_$

DECLARE

p_namespace alias for $1;

p_table alias for $2;

p_field alias for $3;

p_type alias for $4;

v_row record;

v_query text;

BEGIN

select 1 into v_row from pg_namespace n, pg_class c, pg_attribute a

where "_MY_Cluster".slon_quote_brute(n.nspname) = p_namespace and

c.relnamespace = n.oid and

"_MY_Cluster".slon_quote_brute(c.relname) = p_table and

a.attrelid = c.oid and

"_MY_Cluster".slon_quote_brute(a.attname) = p_field;

if not found then

raise notice 'Upgrade table %.% - add field %', p_namespace, p_table,
p_field;

v_query := 'alter table ' || p_namespace || '.' || p_table || ' add
column ';

v_query := v_query || p_field || ' ' || p_type || ';';

execute v_query;

return 't';

else

return 'f';

end if;

END;$_$

LANGUAGE plpgsql;

---------------------------------------------------

Could you help me please with this error?

Thank you

Renaud Fortier

Browse pgadmin-support by date

  From Date Subject
Next Message Henry Andres Sanabria Fuentes 2006-03-22 02:31:09 Help
Previous Message Shulman, Michael 2006-03-21 15:47:36 Connecting error