Small changes to use the absolute path to system catalogs.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 16 May 2003 13:37:00 +0000 (13:37 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 16 May 2003 13:37:00 +0000 (13:37 +0000)
Greg Sabino Mullane

src/pl/tcl/modules/pltcl_loadmod.in
src/pl/tcl/pltcl.c
src/pl/tcl/test/test_setup.sql

index 084f24967d1a574724ea278424463c4a3dd6688a..c26e2a229e3f6e87465f5b85c97cfd824dc5928b 100644 (file)
@@ -84,7 +84,7 @@ proc __PLTcl_loadmod_check_table {conn tabname expnames exptypes} {
     set found 0
 
     pg_select $conn "select C.relname, A.attname, A.attnum, T.typname  \
-           from pg_class C, pg_attribute A, pg_type T      \
+           from pg_catalog.pg_class C, pg_catalog.pg_attribute A, pg_catalog.pg_type T     \
        where C.relname = '$tabname'                \
          and A.attrelid = C.oid                \
          and A.attnum > 0                  \
index 28e08f43d53164a2a3ad47dbe126ae4697184214..fb33e4241fef153e6cec1bbf2904fbca693b650b 100644 (file)
@@ -31,7 +31,7 @@
  *   ENHANCEMENTS, OR MODIFICATIONS.
  *
  * IDENTIFICATION
- *   $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.69 2003/02/06 17:02:11 tgl Exp $
+ *   $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.70 2003/05/16 13:37:00 tgl Exp $
  *
  **********************************************************************/
 
@@ -309,7 +309,7 @@ pltcl_init_load_unknown(Tcl_Interp *interp)
    /************************************************************
     * Check if table pltcl_modules exists
     ************************************************************/
-   spi_rc = SPI_exec("select 1 from pg_class "
+   spi_rc = SPI_exec("select 1 from pg_catalog.pg_class "
                      "where relname = 'pltcl_modules'", 1);
    SPI_freetuptable(SPI_tuptable);
    if (spi_rc != SPI_OK_SELECT)
index 8fa9fec6517755e11015ef9f3319a2cb640fb069..568a2b3aeb0cced0674d6d5eb985c78b88cf5d9e 100644 (file)
@@ -319,7 +319,7 @@ create function check_primkey() returns trigger as '
        # Lookup the fields type in pg_attribute
        #
        set n [spi_exec "select T.typname           \\
-           from pg_type T, pg_attribute A, pg_class C  \\
+           from pg_catalog.pg_type T, pg_catalog.pg_attribute A, pg_catalog.pg_class C \\
        where C.relname  = ''[quote $keyrel]''      \\
          and C.oid      = A.attrelid           \\
          and A.attname  = ''[quote $key]''     \\
@@ -343,7 +343,7 @@ create function check_primkey() returns trigger as '
    #
    # Lookup and remember the table name for later error messages
    #
-   spi_exec "select relname from pg_class          \\
+   spi_exec "select relname from pg_catalog.pg_class   \\
        where oid = ''$TG_relid''::oid"
    set GD($planrel) $relname
     }