Wed Feb 16 22:51:27 PST 2005
- Previous message: [Slony1-commit] By smsimms: Add a missing WHERE clause that causes MOVE SET to fail
- Next message: [Slony1-commit] By wieck: First cut on the log shipping mechanism.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Log Message:
-----------
Provide a less cryptic error message when you pass a non-existent
tablename to determineIdxnameUnique or determineAttkindUnique.
Modified Files:
--------------
slony1-engine/src/backend:
slony1_funcs.sql (r1.54 -> r1.55)
-------------- next part --------------
Index: slony1_funcs.sql
===================================================================
RCS file: /usr/local/cvsroot/slony1/slony1-engine/src/backend/slony1_funcs.sql,v
retrieving revision 1.54
retrieving revision 1.55
diff -Lsrc/backend/slony1_funcs.sql -Lsrc/backend/slony1_funcs.sql -u -w -r1.54 -r1.55
--- src/backend/slony1_funcs.sql
+++ src/backend/slony1_funcs.sql
@@ -4271,6 +4271,18 @@
v_idxrow record;
begin
--
+ -- Ensure that the table exists
+ --
+ if (select PGC.relname
+ from "pg_catalog".pg_class PGC,
+ "pg_catalog".pg_namespace PGN
+ where "pg_catalog".quote_ident(PGN.nspname) || ''.'' ||
+ "pg_catalog".quote_ident(PGC.relname) = p_tab_fqname
+ and PGN.oid = PGC.relnamespace) is null then
+ raise exception ''Slony-I: table % not found'', p_tab_fqname;
+ end if;
+
+ --
-- Lookup the tables primary key or the specified unique index
--
if p_idx_name isnull then
@@ -4381,6 +4393,18 @@
v_attfound bool;
begin
--
+ -- Ensure that the table exists
+ --
+ if (select PGC.relname
+ from "pg_catalog".pg_class PGC,
+ "pg_catalog".pg_namespace PGN
+ where "pg_catalog".quote_ident(PGN.nspname) || ''.'' ||
+ "pg_catalog".quote_ident(PGC.relname) = p_tab_fqname
+ and PGN.oid = PGC.relnamespace) is null then
+ raise exception ''Slony-I: table % not found'', p_tab_fqname;
+ end if;
+
+ --
-- Lookup the tables primary key or the specified unique index
--
if p_idx_name isnull then
- Previous message: [Slony1-commit] By smsimms: Add a missing WHERE clause that causes MOVE SET to fail
- Next message: [Slony1-commit] By wieck: First cut on the log shipping mechanism.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Slony1-commit mailing list