~ubuntu-branches/ubuntu/trusty/postgresql-8.4/trusty

« back to all changes in this revision

Viewing changes to src/backend/utils/init/postinit.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2009-07-11 16:59:35 UTC
  • mfrom: (5.1.1 karmic)
  • Revision ID: james.westby@ubuntu.com-20090711165935-jfwin6gfrxf0gfsi
Tags: 8.4.0-2
* debian/libpq-dev.install: Ship catalog/genbki.h. (Closes: #536139)
* debian/rules: Drop --enable-cassert for final release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 *
9
9
 *
10
10
 * IDENTIFICATION
11
 
 *        $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.190 2009/04/08 13:08:09 heikki Exp $
 
11
 *        $PostgreSQL: pgsql/src/backend/utils/init/postinit.c,v 1.191 2009/06/11 14:49:05 momjian Exp $
12
12
 *
13
13
 *
14
14
 *-------------------------------------------------------------------------
242
242
        /* If we have no other source of client_encoding, use server encoding */
243
243
        SetConfigOption("client_encoding", GetDatabaseEncodingName(),
244
244
                                        PGC_BACKEND, PGC_S_DEFAULT);
245
 
        
246
 
        /* assign locale variables */ 
 
245
 
 
246
        /* assign locale variables */
247
247
        collate = NameStr(dbform->datcollate);
248
248
        ctype = NameStr(dbform->datctype);
249
 
                                        
 
249
 
250
250
        if (setlocale(LC_COLLATE, collate) == NULL)
251
 
                ereport(FATAL, 
 
251
                ereport(FATAL,
252
252
                        (errmsg("database locale is incompatible with operating system"),
253
 
                        errdetail("The database was initialized with LC_COLLATE \"%s\", "
254
 
                                                " which is not recognized by setlocale().", collate),
255
 
                        errhint("Recreate the database with another locale or install the missing locale.")));
256
 
                        
 
253
                         errdetail("The database was initialized with LC_COLLATE \"%s\", "
 
254
                                           " which is not recognized by setlocale().", collate),
 
255
                         errhint("Recreate the database with another locale or install the missing locale.")));
 
256
 
257
257
        if (setlocale(LC_CTYPE, ctype) == NULL)
258
 
                ereport(FATAL, 
 
258
                ereport(FATAL,
259
259
                        (errmsg("database locale is incompatible with operating system"),
260
 
                        errdetail("The database was initialized with LC_CTYPE \"%s\", "
261
 
                                                " which is not recognized by setlocale().", ctype),
262
 
                        errhint("Recreate the database with another locale or install the missing locale.")));
263
 
                        
 
260
                         errdetail("The database was initialized with LC_CTYPE \"%s\", "
 
261
                                           " which is not recognized by setlocale().", ctype),
 
262
                         errhint("Recreate the database with another locale or install the missing locale.")));
 
263
 
264
264
        /* Make the locale settings visible as GUC variables, too */
265
265
        SetConfigOption("lc_collate", collate, PGC_INTERNAL, PGC_S_OVERRIDE);
266
266
        SetConfigOption("lc_ctype", ctype, PGC_INTERNAL, PGC_S_OVERRIDE);
623
623
                MyProcPort->canAcceptConnections == CAC_WAITBACKUP)
624
624
                ereport(FATAL,
625
625
                                (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
626
 
                                 errmsg("must be superuser to connect during database shutdown")));
 
626
                   errmsg("must be superuser to connect during database shutdown")));
627
627
 
628
628
        /*
629
629
         * Check a normal user hasn't connected to a superuser reserved slot.