]> granicus.if.org Git - postgresql/commitdiff
Mark a few functions as static or NOT_USED.
authorBruce Momjian <bruce@momjian.us>
Tue, 18 Jul 2006 17:42:01 +0000 (17:42 +0000)
committerBruce Momjian <bruce@momjian.us>
Tue, 18 Jul 2006 17:42:01 +0000 (17:42 +0000)
src/backend/commands/opclasscmds.c
src/backend/rewrite/rewriteDefine.c
src/bin/pg_dump/pg_backup_archiver.c
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_dump/pg_backup_db.c
src/bin/pg_dump/pg_backup_db.h
src/bin/psql/command.c
src/bin/psql/command.h
src/include/commands/defrem.h

index f5001ff663394c24a89c9e9645774b46d46da209..5d77e056e13d406702dac336d7c80d1d887aeec9 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.47 2006/07/14 14:52:18 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/commands/opclasscmds.c,v 1.48 2006/07/18 17:42:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -924,6 +924,7 @@ RenameOpClass(List *name, const char *access_method, const char *newname)
 /*
  * Change opclass owner by oid
  */
+#ifdef NOT_USED
 void
 AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId)
 {
@@ -943,6 +944,7 @@ AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId)
        heap_freetuple(tup);
        heap_close(rel, NoLock);
 }
+#endif
 
 /*
  * Change opclass owner by name
index 0266696606f7ed3de6087fbe83ccd47f503a726c..3e1f65d86817436c3b53d3a103dec75fe5e36740 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/backend/rewrite/rewriteDefine.c,v 1.110 2006/07/14 14:52:22 momjian Exp $
+ *       $PostgreSQL: pgsql/src/backend/rewrite/rewriteDefine.c,v 1.111 2006/07/18 17:42:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -552,6 +552,7 @@ setRuleCheckAsUser_walker(Node *node, Oid *context)
  *
  * This is unused code at the moment.
  */
+#ifdef NOT_USED
 void
 RenameRewriteRule(Oid owningRel, const char *oldName,
                                  const char *newName)
@@ -588,3 +589,4 @@ RenameRewriteRule(Oid owningRel, const char *oldName,
        heap_freetuple(ruletup);
        heap_close(pg_rewrite_desc, RowExclusiveLock);
 }
+#endif
index 01d837d99267d9d642ccd22970d3201a44664555..76ebc0b89b05e89ffb2a41510cfc762189be2dfc 100644 (file)
@@ -15,7 +15,7 @@
  *
  *
  * IDENTIFICATION
- *             $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.133 2006/07/14 14:52:26 momjian Exp $
+ *             $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.134 2006/07/18 17:42:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -69,6 +69,8 @@ static void _write_msg(const char *modulename, const char *fmt, va_list ap);
 static void _die_horribly(ArchiveHandle *AH, const char *modulename, const char *fmt, va_list ap);
 
 static void dumpTimestamp(ArchiveHandle *AH, const char *msg, time_t tim);
+static OutputContext SetOutput(ArchiveHandle *AH, char *filename, int compression);
+static void ResetOutput(ArchiveHandle *AH, OutputContext savedContext);
 
 
 /*
@@ -860,7 +862,7 @@ archprintf(Archive *AH, const char *fmt,...)
  * Stuff below here should be 'private' to the archiver routines
  *******************************/
 
-OutputContext
+static OutputContext
 SetOutput(ArchiveHandle *AH, char *filename, int compression)
 {
        OutputContext sav;
@@ -912,7 +914,7 @@ SetOutput(ArchiveHandle *AH, char *filename, int compression)
        return sav;
 }
 
-void
+static void
 ResetOutput(ArchiveHandle *AH, OutputContext sav)
 {
        int                     res;
@@ -985,7 +987,7 @@ ahlog(ArchiveHandle *AH, int level, const char *fmt,...)
 /*
  * Single place for logic which says 'We are restoring to a direct DB connection'.
  */
-int
+static int
 RestoringToDB(ArchiveHandle *AH)
 {
        return (AH->ropt && AH->ropt->useDB && AH->connection);
index b53ff9fbc3afdf5e9544336e574c6d14fbb62505..1ed3f281a63ff538fffd650667714549f9ea949a 100644 (file)
@@ -17,7 +17,7 @@
  *
  *
  * IDENTIFICATION
- *             $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.71 2006/07/11 13:54:24 momjian Exp $
+ *             $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.72 2006/07/18 17:42:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -353,9 +353,6 @@ extern void InitArchiveFmt_Tar(ArchiveHandle *AH);
 
 extern bool isValidTarHeader(char *header);
 
-extern OutputContext SetOutput(ArchiveHandle *AH, char *filename, int compression);
-extern void ResetOutput(ArchiveHandle *AH, OutputContext savedContext);
-extern int     RestoringToDB(ArchiveHandle *AH);
 extern int     ReconnectToServer(ArchiveHandle *AH, const char *dbname, const char *newUser);
 
 int                    ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH);
index 80aef2a6a239471a81dcf2329fa99a081f3ec201..a5ca77c545b70dc71e35ffc75200ca2c773d4b5e 100644 (file)
@@ -5,7 +5,7 @@
  *     Implements the basic DB functions used by the archiver.
  *
  * IDENTIFICATION
- *       $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.72 2006/07/14 14:52:26 momjian Exp $
+ *       $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.c,v 1.73 2006/07/18 17:42:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -283,7 +283,7 @@ notice_processor(void *arg, const char *message)
 
 /* Public interface */
 /* Convenience function to send a query. Monitors result to handle COPY statements */
-int
+static int
 ExecuteSqlCommand(ArchiveHandle *AH, PQExpBuffer qry, char *desc)
 {
        PGconn     *conn = AH->connection;
index 9b42f80c4e6c62b0aa5a1c86be21bfc2cd092ae8..8d09eebe89d4bcde24f431f192ecbbaa528a0b41 100644 (file)
@@ -2,7 +2,7 @@
  *     Definitions for pg_backup_db.c
  *
  *     IDENTIFICATION
- *             $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.h,v 1.12 2006/07/11 13:54:24 momjian Exp $
+ *             $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_db.h,v 1.13 2006/07/18 17:42:01 momjian Exp $
  */
 
 #ifndef PG_BACKUP_DB_H
@@ -10,7 +10,6 @@
 
 #include "pg_backup_archiver.h"
 
-extern int     ExecuteSqlCommand(ArchiveHandle *AH, PQExpBuffer qry, char *desc);
 extern int     ExecuteSqlCommandBuf(ArchiveHandle *AH, void *qry, size_t bufLen);
 
 extern void StartTransaction(ArchiveHandle *AH);
index a9d8a07f8350e83b6f8567fdd8719b4acdb6dc0e..971ad0c81613d6c77a7fd7094c41c91bc17fbd4e 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2000-2006, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.170 2006/06/11 23:06:00 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.c,v 1.171 2006/07/18 17:42:01 momjian Exp $
  */
 #include "postgres_fe.h"
 #include "command.h"
@@ -55,6 +55,8 @@ static backslashResult exec_command(const char *cmd,
 static bool do_edit(const char *filename_arg, PQExpBuffer query_buf);
 static bool do_connect(char *dbname, char *user, char *host, char *port);
 static bool do_shell(const char *command);
+static void SyncVerbosityVariable(void);
+
 
 
 /*----------
@@ -1175,7 +1177,7 @@ UnsyncVariables(void)
 /*
  * Update connection state from VERBOSITY variable
  */
-void
+static void
 SyncVerbosityVariable(void)
 {
        switch (SwitchVariable(pset.vars, "VERBOSITY",
index 9e8351580ec3660effbba8cd3e95fe5765100b0c..2abbe499d16302fba77d1aa1c8b0c909c8fd0d80 100644 (file)
@@ -3,7 +3,7 @@
  *
  * Copyright (c) 2000-2006, PostgreSQL Global Development Group
  *
- * $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.26 2006/07/14 14:52:26 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/command.h,v 1.27 2006/07/18 17:42:01 momjian Exp $
  */
 #ifndef COMMAND_H
 #define COMMAND_H
@@ -38,6 +38,4 @@ extern void SyncVariables(void);
 
 extern void UnsyncVariables(void);
 
-extern void SyncVerbosityVariable(void);
-
 #endif   /* COMMAND_H */
index ac4b2a3a5014944c97382c818dfa5b1130ae5fde..902931d02aa26e2ac1e42eb55ac7f0bf533175b4 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.74 2006/07/03 22:45:40 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/commands/defrem.h,v 1.75 2006/07/18 17:42:01 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -82,7 +82,6 @@ extern void RemoveOpClass(RemoveOpClassStmt *stmt);
 extern void RemoveOpClassById(Oid opclassOid);
 extern void RenameOpClass(List *name, const char *access_method, const char *newname);
 extern void AlterOpClassOwner(List *name, const char *access_method, Oid newOwnerId);
-extern void AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId);
 
 /* support routines in commands/define.c */