Remove serial_seqam GUC.
authorHeikki Linnakangas <[email protected]>
Mon, 20 Apr 2015 09:30:30 +0000 (12:30 +0300)
committerHeikki Linnakangas <[email protected]>
Mon, 20 Apr 2015 10:34:13 +0000 (13:34 +0300)
doc/src/sgml/config.sgml
src/backend/access/sequence/seqam.c
src/backend/parser/parse_utilcmd.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/access/seqam.h
src/include/utils/guc.h

index ce401067b958e1c132bdaeba2683772e7f680416..b30c68dc138eafacf3b55ac9aa483d8fa4245e0d 100644 (file)
@@ -5671,27 +5671,6 @@ COPY postgres_log FROM '/full/path/to/logfile.csv' WITH csv;
       </listitem>
      </varlistentry>
 
-     <varlistentry id="guc-serial-sequenceam" xreflabel="serial_sequenceam">
-      <term><varname>serial_sequenceam</varname> (<type>string</type>)
-      <indexterm>
-       <primary><varname>serial_sequenceam</> configuration parameter</primary>
-      </indexterm>
-      <indexterm><primary>sequence access method</><secondary>serial</></>
-      </term>
-      <listitem>
-       <para>
-        This variable specifies the default sequence access method to be used
-        for <type>SERIAL</> and <type>BIGSERIAL</>.
-       </para>
-
-       <para>
-        The default is 'local' sequence access method. If the value does not
-        match the name of any existing sequence access method, an error will be
-        raised.
-       </para>
-      </listitem>
-     </varlistentry>
-
      <varlistentry id="guc-check-function-bodies" xreflabel="check_function_bodies">
       <term><varname>check_function_bodies</varname> (<type>boolean</type>)
       <indexterm>
index 6292a1b96afb6b1cb37d8fe6c77745429caaef67..880b6da5a393a673c5737984ebbe45a4ad4a9987 100644 (file)
@@ -72,8 +72,6 @@
 #include "utils/rel.h"
 #include "utils/syscache.h"
 
-char   *serial_seqam = NULL;
-
 #define GET_SEQAM_PROCEDURE(pname, missing_ok) \
 do { \
        procedure = &seqrel->rd_aminfo->pname; \
@@ -310,42 +308,6 @@ seqam_set_state(Relation seqrel, SequenceHandle *seqh, char **keys,
  *------------------------------------------------------------
  */
 
-/* check_hook: validate new serial_seqam value */
-bool
-check_serial_seqam(char **newval, void **extra, GucSource source)
-{
-       /*
-        * If we aren't inside a transaction, we cannot do database access so
-        * cannot verify the name.  Must accept the value on faith.
-        */
-       if (IsTransactionState())
-       {
-               if (!OidIsValid(get_seqam_oid(*newval, true)))
-               {
-                       /*
-                        * When source == PGC_S_TEST, we are checking the argument of an
-                        * ALTER DATABASE SET or ALTER USER SET command.  Value may
-                        * be created later.  Because of that, issue a NOTICE if source ==
-                        * PGC_S_TEST, but accept the value anyway.
-                        */
-                       if (source == PGC_S_TEST)
-                       {
-                               ereport(NOTICE,
-                                               (errcode(ERRCODE_UNDEFINED_OBJECT),
-                                                errmsg("sequence access method \"%s\" does not exist",
-                                                               *newval)));
-                       }
-                       else
-                       {
-                               GUC_check_errdetail("sequence access method \"%s\" does not exist.",
-                                                                       *newval);
-                               return false;
-                       }
-               }
-       }
-       return true;
-}
-
 
 /*
  * get_seqam_oid - given a sequence AM name, look up the OID
index dce6566ee893336074a2eabf1ad1f24b9cb9eee2..9832384be8376ade4de1a4ee150caffd3095d08e 100644 (file)
@@ -406,7 +406,7 @@ transformColumnDefinition(CreateStmtContext *cxt, ColumnDef *column)
                seqstmt->sequence = makeRangeVar(snamespace, sname, -1);
                seqstmt->options = NIL;
                seqstmt->amoptions = NIL;
-               seqstmt->accessMethod = serial_seqam;
+               seqstmt->accessMethod = NULL;
 
                /*
                 * If this is ALTER ADD COLUMN, make sure the sequence will be owned
index 1d31ceaef50ecdb16d7ec9e99f3f6cf0a57701b9..8ab513d615f0a35c4eeb33b4cc924b10d16d2bcd 100644 (file)
@@ -2894,17 +2894,6 @@ static struct config_string ConfigureNamesString[] =
                check_default_tablespace, NULL, NULL
        },
 
-       {
-               {"serial_sequenceam", PGC_USERSET, CLIENT_CONN_STATEMENT,
-                       gettext_noop("Sets the default sequence access method for SERIAL and BIGSERIAL column types."),
-                       gettext_noop("Defaults to 'local' sequence access method."),
-                       GUC_IS_NAME
-               },
-               &serial_seqam,
-               "local",
-               check_serial_seqam, NULL, NULL
-       },
-
        {
                {"temp_tablespaces", PGC_USERSET, CLIENT_CONN_STATEMENT,
                        gettext_noop("Sets the tablespace(s) to use for temporary tables and sort files."),
index a90637b05b14e97d1eeb0ea5e3e3ccbc75eca0e8..110983f176417cc3de91456b3ed48fe6ff7c8c20 100644 (file)
 #default_tablespace = ''               # a tablespace name, '' uses the default
 #temp_tablespaces = ''                 # a list of tablespace names, '' uses
                                        # only default tablespace
-#serial_sequenceam = 'local'   # default sequence access method for SERIAL
 #check_function_bodies = on
 #default_transaction_isolation = 'read committed'
 #default_transaction_read_only = off
index e53f1abd72537818269d9c4d84377855803c7d5b..0ce2bd1590b4c3ac4486aec34185b1e3b5abeca8 100644 (file)
@@ -26,8 +26,6 @@
 struct SequenceHandle;
 typedef struct SequenceHandle SequenceHandle;
 
-extern char *serial_seqam;
-
 extern void seqam_init(Oid seqamid, Oid seqrelid, List *seqparams,
                                           List *reloptions, Datum *values, bool *nulls);
 extern int64 seqam_alloc(Relation seqrel, SequenceHandle *seqh,
index 1ac3ef73f7b6e4a0899bf52983ebb927be15e4c4..ff78b70b96deeee6e476a5b3a720bfe0e920a562 100644 (file)
@@ -410,7 +410,6 @@ extern void GUC_check_errcode(int sqlerrcode);
  */
 
 /* in commands/tablespace.c */
-extern bool check_serial_seqam(char **newval, void **extra, GucSource source);
 extern bool check_default_tablespace(char **newval, void **extra, GucSource source);
 extern bool check_temp_tablespaces(char **newval, void **extra, GucSource source);
 extern void assign_temp_tablespaces(const char *newval, void *extra);