]> granicus.if.org Git - postgis/commitdiff
Applyed Michael Fuhrs patch to fix the reserved word issue against PostgreSQL 8.3.
authorMark Leslie <mark.leslie@lisasoft.com>
Thu, 26 Jul 2007 18:55:37 +0000 (18:55 +0000)
committerMark Leslie <mark.leslie@lisasoft.com>
Thu, 26 Jul 2007 18:55:37 +0000 (18:55 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2671 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/long_xact.sql.in

index c3bc1eed73f0ca83c7391595f702c778d3260359..a6df7fde8bbd95844ce417e28dbba3a805db5f0a 100644 (file)
@@ -229,7 +229,7 @@ CREATEFUNCTION EnableLongTransactions()
        RETURNS TEXT
        AS '
 DECLARE
-       query text;
+       "query" text;
        exists bool;
        rec RECORD;
 
@@ -243,13 +243,13 @@ BEGIN
 
        IF NOT exists
        THEN
-               query = ''CREATE TABLE authorization_table (
+               "query" = ''CREATE TABLE authorization_table (
                        toid oid, -- table oid
                        rid text, -- row id
                        expires timestamp,
                        authid text
                )'';
-               EXECUTE query;
+               EXECUTE "query";
        END IF;
 
        exists = ''f'';
@@ -259,7 +259,7 @@ BEGIN
        END LOOP;
 
        IF NOT exists THEN
-               query = ''CREATE VIEW authorized_tables AS '' ||
+               "query" = ''CREATE VIEW authorized_tables AS '' ||
                        ''SELECT '' ||
 #ifdef HAS_SCHEMAS
                        ''n.nspname as schema, '' ||
@@ -276,7 +276,7 @@ BEGIN
                        '' AND c.relnamespace = n.oid'' ||
 #endif
                        '' AND t.tgfoid = p.oid and t.tgrelid = c.oid'';
-               EXECUTE query;
+               EXECUTE "query";
        END IF;
 
        RETURN ''Long transactions support enabled'';
@@ -313,8 +313,6 @@ CREATEFUNCTION DisableLongTransactions()
        RETURNS TEXT
        AS '
 DECLARE
-       query text;
-       exists bool;
        rec RECORD;
 
 BEGIN