mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Mark a few functions as static or NOT_USED.
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
* Change opclass owner by oid
|
||||||
*/
|
*/
|
||||||
|
#ifdef NOT_USED
|
||||||
void
|
void
|
||||||
AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId)
|
AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId)
|
||||||
{
|
{
|
||||||
@ -943,6 +944,7 @@ AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId)
|
|||||||
heap_freetuple(tup);
|
heap_freetuple(tup);
|
||||||
heap_close(rel, NoLock);
|
heap_close(rel, NoLock);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Change opclass owner by name
|
* Change opclass owner by name
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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.
|
* This is unused code at the moment.
|
||||||
*/
|
*/
|
||||||
|
#ifdef NOT_USED
|
||||||
void
|
void
|
||||||
RenameRewriteRule(Oid owningRel, const char *oldName,
|
RenameRewriteRule(Oid owningRel, const char *oldName,
|
||||||
const char *newName)
|
const char *newName)
|
||||||
@ -588,3 +589,4 @@ RenameRewriteRule(Oid owningRel, const char *oldName,
|
|||||||
heap_freetuple(ruletup);
|
heap_freetuple(ruletup);
|
||||||
heap_close(pg_rewrite_desc, RowExclusiveLock);
|
heap_close(pg_rewrite_desc, RowExclusiveLock);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 _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 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
|
* Stuff below here should be 'private' to the archiver routines
|
||||||
*******************************/
|
*******************************/
|
||||||
|
|
||||||
OutputContext
|
static OutputContext
|
||||||
SetOutput(ArchiveHandle *AH, char *filename, int compression)
|
SetOutput(ArchiveHandle *AH, char *filename, int compression)
|
||||||
{
|
{
|
||||||
OutputContext sav;
|
OutputContext sav;
|
||||||
@ -912,7 +914,7 @@ SetOutput(ArchiveHandle *AH, char *filename, int compression)
|
|||||||
return sav;
|
return sav;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static void
|
||||||
ResetOutput(ArchiveHandle *AH, OutputContext sav)
|
ResetOutput(ArchiveHandle *AH, OutputContext sav)
|
||||||
{
|
{
|
||||||
int res;
|
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'.
|
* Single place for logic which says 'We are restoring to a direct DB connection'.
|
||||||
*/
|
*/
|
||||||
int
|
static int
|
||||||
RestoringToDB(ArchiveHandle *AH)
|
RestoringToDB(ArchiveHandle *AH)
|
||||||
{
|
{
|
||||||
return (AH->ropt && AH->ropt->useDB && AH->connection);
|
return (AH->ropt && AH->ropt->useDB && AH->connection);
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 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);
|
extern int ReconnectToServer(ArchiveHandle *AH, const char *dbname, const char *newUser);
|
||||||
|
|
||||||
int ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH);
|
int ahwrite(const void *ptr, size_t size, size_t nmemb, ArchiveHandle *AH);
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Implements the basic DB functions used by the archiver.
|
* Implements the basic DB functions used by the archiver.
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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 */
|
/* Public interface */
|
||||||
/* Convenience function to send a query. Monitors result to handle COPY statements */
|
/* Convenience function to send a query. Monitors result to handle COPY statements */
|
||||||
int
|
static int
|
||||||
ExecuteSqlCommand(ArchiveHandle *AH, PQExpBuffer qry, char *desc)
|
ExecuteSqlCommand(ArchiveHandle *AH, PQExpBuffer qry, char *desc)
|
||||||
{
|
{
|
||||||
PGconn *conn = AH->connection;
|
PGconn *conn = AH->connection;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* Definitions for pg_backup_db.c
|
* Definitions for pg_backup_db.c
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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
|
#ifndef PG_BACKUP_DB_H
|
||||||
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
#include "pg_backup_archiver.h"
|
#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 int ExecuteSqlCommandBuf(ArchiveHandle *AH, void *qry, size_t bufLen);
|
||||||
|
|
||||||
extern void StartTransaction(ArchiveHandle *AH);
|
extern void StartTransaction(ArchiveHandle *AH);
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
|
* 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 "postgres_fe.h"
|
||||||
#include "command.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_edit(const char *filename_arg, PQExpBuffer query_buf);
|
||||||
static bool do_connect(char *dbname, char *user, char *host, char *port);
|
static bool do_connect(char *dbname, char *user, char *host, char *port);
|
||||||
static bool do_shell(const char *command);
|
static bool do_shell(const char *command);
|
||||||
|
static void SyncVerbosityVariable(void);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*----------
|
/*----------
|
||||||
@ -1175,7 +1177,7 @@ UnsyncVariables(void)
|
|||||||
/*
|
/*
|
||||||
* Update connection state from VERBOSITY variable
|
* Update connection state from VERBOSITY variable
|
||||||
*/
|
*/
|
||||||
void
|
static void
|
||||||
SyncVerbosityVariable(void)
|
SyncVerbosityVariable(void)
|
||||||
{
|
{
|
||||||
switch (SwitchVariable(pset.vars, "VERBOSITY",
|
switch (SwitchVariable(pset.vars, "VERBOSITY",
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 2000-2006, PostgreSQL Global Development Group
|
* 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
|
#ifndef COMMAND_H
|
||||||
#define COMMAND_H
|
#define COMMAND_H
|
||||||
@ -38,6 +38,4 @@ extern void SyncVariables(void);
|
|||||||
|
|
||||||
extern void UnsyncVariables(void);
|
extern void UnsyncVariables(void);
|
||||||
|
|
||||||
extern void SyncVerbosityVariable(void);
|
|
||||||
|
|
||||||
#endif /* COMMAND_H */
|
#endif /* COMMAND_H */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* 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 RemoveOpClassById(Oid opclassOid);
|
||||||
extern void RenameOpClass(List *name, const char *access_method, const char *newname);
|
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(List *name, const char *access_method, Oid newOwnerId);
|
||||||
extern void AlterOpClassOwner_oid(Oid opcOid, Oid newOwnerId);
|
|
||||||
|
|
||||||
/* support routines in commands/define.c */
|
/* support routines in commands/define.c */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user