]> granicus.if.org Git - postgresql/commitdiff
Remove double-quoting of table names in clusterdb. BACKWARD COMPABILITY
authorBruce Momjian <bruce@momjian.us>
Sat, 10 Sep 2011 20:39:02 +0000 (16:39 -0400)
committerBruce Momjian <bruce@momjian.us>
Sat, 10 Sep 2011 20:39:02 +0000 (16:39 -0400)
BREAKAGE.

Remove double-quoting of index/table names in reindexdb.  BACKWARD
COMPABILITY BREAKAGE.

Document thate user/database names are preserved with double-quoting by
command-line tools like vacuumdb.

doc/src/sgml/ref/createdb.sgml
doc/src/sgml/ref/createlang.sgml
doc/src/sgml/ref/droplang.sgml
doc/src/sgml/reference.sgml
src/bin/scripts/clusterdb.c
src/bin/scripts/createlang.c
src/bin/scripts/droplang.c
src/bin/scripts/reindexdb.c

index 3e50173e22a159700aa9981174bf83249ae45768..1516f3396d6e2dc03890f8f01abd80417c6cf546 100644 (file)
@@ -90,7 +90,8 @@ PostgreSQL documentation
       <term><option>--tablespace=<replaceable class="parameter">tablespace</replaceable></></term>
       <listitem>
        <para>
-        Specifies the default tablespace for the database.
+        Specifies the default tablespace for the database. (This name
+        is processed as a double-quoted identifier.)
        </para>
       </listitem>
      </varlistentry>
@@ -154,6 +155,7 @@ PostgreSQL documentation
       <listitem>
        <para>
         Specifies the database user who will own the new database.
+        (This name is processed as a double-quoted identifier.)
        </para>
       </listitem>
      </varlistentry>
@@ -163,7 +165,8 @@ PostgreSQL documentation
       <term><option>--template=<replaceable class="parameter">template</replaceable></></term>
       <listitem>
        <para>
-        Specifies the template database from which to build this database.
+        Specifies the template database from which to build this
+        database.  (This name is processed as a double-quoted identifier.)
        </para>
       </listitem>
      </varlistentry>
index f01f29832289f59d2d7a11be426c32af152702f0..d28cfb772abaddd245cb1c87b918b7727bdc078f 100644 (file)
@@ -70,7 +70,8 @@ PostgreSQL documentation
       <term><replaceable class="parameter">langname</replaceable></term>
       <listitem>
        <para>
-        Specifies the name of the procedural language to be installed.
+        Specifies the name of the procedural language to be
+        installed.  (This name is lower-cased.)
        </para>
       </listitem>
      </varlistentry>
index 04c3a609e5db8c400eb55bb7ef9559bed09c88a7..e5d02aa236f86cf3e7842d6aae34be09c0816c57 100644 (file)
@@ -73,6 +73,7 @@ PostgreSQL documentation
       <listitem>
        <para>
         Specifies the name of the procedural language to be removed.
+        (This name is lower-cased.)
        </para>
       </listitem>
      </varlistentry>
index 9ae80005cdfe51cadc732528d4939e6ff389fefb..5fd6410991dc733e3a3e3baeba3519d2cefe17e2 100644 (file)
     applications is that they can be run on any host, independent of
     where the database server resides.
    </para>
+
+   <para>
+    When specified on the command line, user and databases names have
+    their case preserved &mdash; the presence of spaces or special
+    characters might require quoting.  Table names and other identifiers
+    do not have their case preserved, except where documented, and
+    might require quoting.
+   </para>
   </partintro>
 
    &clusterdb;
index f4c317ae149fc80abaea4fbb0a9c4fd06f5696a4..3742091e2a4d2741ff78d0885a70510fd71a8295 100644 (file)
@@ -177,7 +177,7 @@ cluster_one_database(const char *dbname, bool verbose, const char *table,
        if (verbose)
                appendPQExpBuffer(&sql, " VERBOSE");
        if (table)
-               appendPQExpBuffer(&sql, " %s", fmtId(table));
+               appendPQExpBuffer(&sql, " %s", table);
        appendPQExpBuffer(&sql, ";\n");
 
        conn = connectDatabase(dbname, host, port, username, prompt_password, progname);
index c2153db630eec757c063385037417f0796f77530..2f667e864a573e3cf01edc350b56ad3399e8e736 100644 (file)
@@ -164,6 +164,7 @@ main(int argc, char *argv[])
                exit(1);
        }
 
+       /* lower case language name */
        for (p = langname; *p; p++)
                if (*p >= 'A' && *p <= 'Z')
                        *p += ('a' - 'A');
index 7fadee0d51374e2a9ff78c1ee481a20e4b32b62e..f136a760ff052f1ce17cc2507535de4d126dadf8 100644 (file)
@@ -165,6 +165,7 @@ main(int argc, char *argv[])
                exit(1);
        }
 
+       /* lower case language name */
        for (p = langname; *p; p++)
                if (*p >= 'A' && *p <= 'Z')
                        *p += ('a' - 'A');
index 53fff01a74b32b7f8c96966c1b9df16b03c5b1bd..caeed7511ee25dd7a52d1cce0409677fe33c3982 100644 (file)
@@ -223,9 +223,9 @@ reindex_one_database(const char *name, const char *dbname, const char *type,
 
        appendPQExpBuffer(&sql, "REINDEX");
        if (strcmp(type, "TABLE") == 0)
-               appendPQExpBuffer(&sql, " TABLE %s", fmtId(name));
+               appendPQExpBuffer(&sql, " TABLE %s", name);
        else if (strcmp(type, "INDEX") == 0)
-               appendPQExpBuffer(&sql, " INDEX %s", fmtId(name));
+               appendPQExpBuffer(&sql, " INDEX %s", name);
        else if (strcmp(type, "DATABASE") == 0)
                appendPQExpBuffer(&sql, " DATABASE %s", fmtId(name));
        appendPQExpBuffer(&sql, ";\n");