are initialized with a string literal. Patch from Stefan Huehner.
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.255 2007/03/17 01:15:55 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/ruleutils.c,v 1.256 2007/03/18 16:50:42 neilc Exp $
*
*-------------------------------------------------------------------------
*/
* ----------
*/
static SPIPlanPtr plan_getrulebyoid = NULL;
-static char *query_getrulebyoid = "SELECT * FROM pg_catalog.pg_rewrite WHERE oid = $1";
+static const char *query_getrulebyoid = "SELECT * FROM pg_catalog.pg_rewrite WHERE oid = $1";
static SPIPlanPtr plan_getviewrule = NULL;
-static char *query_getviewrule = "SELECT * FROM pg_catalog.pg_rewrite WHERE ev_class = $1 AND rulename = $2";
+static const char *query_getviewrule = "SELECT * FROM pg_catalog.pg_rewrite WHERE ev_class = $1 AND rulename = $2";
/* ----------
* Portions Copyright (c) 1994, Regents of the University of California
* Portions taken from FreeBSD.
*
- * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.134 2007/02/20 23:49:38 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/initdb/initdb.c,v 1.135 2007/03/18 16:50:43 neilc Exp $
*
*-------------------------------------------------------------------------
*/
struct encoding_match
{
enum pg_enc pg_enc_code;
- char *system_enc_name;
+ const char *system_enc_name;
};
struct encoding_match encoding_match_list[] = {
setup_auth(void)
{
PG_CMD_DECL;
- char **line;
- static char *pg_authid_setup[] = {
+ const char **line;
+ static const char *pg_authid_setup[] = {
/*
* Create triggers to ensure manual updates to shared catalogs will be
* reflected into their "flat file" copies.
setup_depend(void)
{
PG_CMD_DECL;
- char **line;
- static char *pg_depend_setup[] = {
+ const char **line;
+ static const char *pg_depend_setup[] = {
/*
* Make PIN entries in pg_depend for all objects made so far in the
* tables that the dependency code handles. This is overkill (the
make_template0(void)
{
PG_CMD_DECL;
- char **line;
- static char *template0_setup[] = {
+ const char **line;
+ static const char *template0_setup[] = {
"CREATE DATABASE template0;\n",
"UPDATE pg_database SET "
" datistemplate = 't', "
make_postgres(void)
{
PG_CMD_DECL;
- char **line;
- static char *postgres_setup[] = {
+ const char **line;
+ static const char *postgres_setup[] = {
"CREATE DATABASE postgres;\n",
NULL
};
* copyright (c) Oliver Elphick <olly@lfix.co.uk>, 2001;
* licence: BSD
*
- * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.33 2007/03/03 20:02:27 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_controldata/pg_controldata.c,v 1.34 2007/03/18 16:50:43 neilc Exp $
*/
#include "postgres.h"
char pgctime_str[128];
char ckpttime_str[128];
char sysident_str[32];
- char *strftime_fmt = "%c";
+ const char *strftime_fmt = "%c";
const char *progname;
set_pglocale_pgservice(argv[0], "pg_controldata");
*
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.78 2007/02/10 14:58:55 petere Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_ctl/pg_ctl.c,v 1.79 2007/03/18 16:50:44 neilc Exp $
*
*-------------------------------------------------------------------------
*/
static const char *progname;
static char *log_file = NULL;
static char *postgres_path = NULL;
-static char *register_servicename = "PostgreSQL"; /* FIXME: + version ID? */
+static const char *register_servicename = "PostgreSQL"; /* FIXME: + version ID? */
static char *register_username = NULL;
static char *register_password = NULL;
static char *argv0 = NULL;
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.142 2007/02/19 15:05:06 mha Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.143 2007/03/18 16:50:44 neilc Exp $
*
*-------------------------------------------------------------------------
*/
const char *progname;
-static char *modulename = gettext_noop("archiver");
+static const char *modulename = gettext_noop("archiver");
static ArchiveHandle *_allocAH(const char *FileSpec, const ArchiveFormat fmt,
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_custom.c,v 1.37 2007/02/19 15:05:06 mha Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_custom.c,v 1.38 2007/03/18 16:50:44 neilc Exp $
*
*-------------------------------------------------------------------------
*/
static pgoff_t _getFilePos(ArchiveHandle *AH, lclContext *ctx);
static int _DoDeflate(ArchiveHandle *AH, lclContext *ctx, int flush);
-static char *modulename = gettext_noop("custom archiver");
+static const char *modulename = gettext_noop("custom archiver");
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.31 2007/02/19 15:05:06 mha Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_files.c,v 1.32 2007/03/18 16:50:44 neilc Exp $
*
*-------------------------------------------------------------------------
*/
char *filename;
} lclTocEntry;
-static char *modulename = gettext_noop("file archiver");
+static const char *modulename = gettext_noop("file archiver");
static void _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt);
static void _getBlobTocEntry(ArchiveHandle *AH, Oid *oid, char *fname);
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.57 2007/02/19 15:05:06 mha Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.58 2007/03/18 16:50:44 neilc Exp $
*
*-------------------------------------------------------------------------
*/
char *filename;
} lclTocEntry;
-static char *modulename = gettext_noop("tar archiver");
+static const char *modulename = gettext_noop("tar archiver");
static void _LoadBlobs(ArchiveHandle *AH, RestoreOptions *ropt);
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump_sort.c,v 1.17 2007/01/23 17:54:50 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump_sort.c,v 1.18 2007/03/18 16:50:44 neilc Exp $
*
*-------------------------------------------------------------------------
*/
#include "pg_backup_archiver.h"
-static char *modulename = gettext_noop("sorter");
+static const char *modulename = gettext_noop("sorter");
/*
* Sort priority for object types when dumping a pre-7.3 database.
*
* Copyright (c) 2000-2007, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.153 2007/03/16 08:28:01 mha Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/describe.c,v 1.154 2007/03/18 16:50:44 neilc Exp $
*/
#include "postgres_fe.h"
#include "describe.h"
/* print inherits */
for (i = 0; i < inherits_count; i++)
{
- char *s = _("Inherits");
+ const char *s = _("Inherits");
if (i == 0)
printfPQExpBuffer(&buf, "%s: %s", s, PQgetvalue(result6, i, 0));
if (verbose)
{
- char *s = _("Has OIDs");
+ const char *s = _("Has OIDs");
printfPQExpBuffer(&buf, "%s: %s", s,
(tableinfo.hasoids ? _("yes") : _("no")));