diff -ruN postgresql-7.4.13-old/doc/src/sgml/ref/pg_dumpall.sgml postgresql-7.4.13/doc/src/sgml/ref/pg_dumpall.sgml
--- postgresql-7.4.13-old/doc/src/sgml/ref/pg_dumpall.sgml	2003-11-04 10:45:30.000000000 +0100
+++ postgresql-7.4.13/doc/src/sgml/ref/pg_dumpall.sgml	2004-04-01 18:16:38.000000000 +0200
@@ -164,6 +164,18 @@
      </varlistentry>
 
      <varlistentry>
+      <term><option>-N</></term>
+      <term><option>--convert-now</></term>
+      <listitem>
+       <para>
+       In DEFAULT clauses of table column definitions, convert the old
+       <literal>DEFAULT 'now'</literal> syntax (up to PostgreSQL 7.3) to
+       <literal>DEFAULT now()</literal>.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
       <term><option>-o</></term>
       <term><option>--oids</></term>
       <listitem>
diff -ruN postgresql-7.4.13-old/doc/src/sgml/ref/pg_dump.sgml postgresql-7.4.13/doc/src/sgml/ref/pg_dump.sgml
--- postgresql-7.4.13-old/doc/src/sgml/ref/pg_dump.sgml	2003-11-04 10:45:30.000000000 +0100
+++ postgresql-7.4.13/doc/src/sgml/ref/pg_dump.sgml	2004-04-01 18:06:48.000000000 +0200
@@ -301,6 +301,18 @@
      </varlistentry>
 
      <varlistentry>
+      <term><option>-N</></term>
+      <term><option>--convert-now</></term>
+      <listitem>
+       <para>
+       In DEFAULT clauses of table column definitions, convert the old
+       <literal>DEFAULT 'now'</literal> syntax (up to PostgreSQL 7.3) to
+       <literal>DEFAULT now()</literal>.
+       </para>
+      </listitem>
+     </varlistentry>
+
+     <varlistentry>
       <term><option>-o</></term>
       <term><option>--oids</></term>
       <listitem>
diff -ruN postgresql-7.4.13-old/src/bin/pg_dump/pg_dumpall.c postgresql-7.4.13/src/bin/pg_dump/pg_dumpall.c
--- postgresql-7.4.13-old/src/bin/pg_dump/pg_dumpall.c	2004-01-22 20:09:48.000000000 +0100
+++ postgresql-7.4.13/src/bin/pg_dump/pg_dumpall.c	2004-04-01 18:14:53.000000000 +0200
@@ -86,6 +86,7 @@
 		{"globals-only", no_argument, NULL, 'g'},
 		{"host", required_argument, NULL, 'h'},
 		{"ignore-version", no_argument, NULL, 'i'},
+		{"convert-now", no_argument, NULL, 'N'},
 		{"oids", no_argument, NULL, 'o'},
 		{"port", required_argument, NULL, 'p'},
 		{"password", no_argument, NULL, 'W'},
@@ -124,7 +125,7 @@
 	pgdumploc = findPgDump(argv[0]);
 	pgdumpopts = createPQExpBuffer();
 
-	while ((c = getopt_long(argc, argv, "acdDgh:iop:sU:vWx", long_options, &optindex)) != -1)
+	while ((c = getopt_long(argc, argv, "acdDgh:iNop:sU:vWx", long_options, &optindex)) != -1)
 	{
 		switch (c)
 		{
@@ -156,6 +157,10 @@
 				appendPQExpBuffer(pgdumpopts, " -%c", c);
 				break;
 
+			case 'N':
+				appendPQExpBuffer(pgdumpopts, " -N");
+				break;
+
 			case 'p':
 				pgport = optarg;
 				appendPQExpBuffer(pgdumpopts, " -p '%s'", pgport);
@@ -243,6 +248,7 @@
 	printf(_("  -g, --globals-only       dump only global objects, no databases\n"));
 	printf(_("  -i, --ignore-version     proceed even when server version mismatches\n"
 			 "                           pg_dumpall version\n"));
+	printf(_("  -N, --convert-now        convert DEFAULT 'now' to DEFAULT now()\n"));
 	printf(_("  -s, --schema-only        dump only the schema, no data\n"));
 	printf(_("  -o, --oids               include OIDs in dump\n"));
 	printf(_("  -v, --verbose            verbose mode\n"));
diff -ruN postgresql-7.4.13-old/src/bin/pg_dump/pg_dump.c postgresql-7.4.13/src/bin/pg_dump/pg_dump.c
--- postgresql-7.4.13-old/src/bin/pg_dump/pg_dump.c	2004-04-01 18:06:32.000000000 +0200
+++ postgresql-7.4.13/src/bin/pg_dump/pg_dump.c	2004-04-01 18:06:48.000000000 +0200
@@ -135,6 +135,7 @@
 bool		schemaOnly;
 bool		dataOnly;
 bool		aclsSkip;
+bool		convertNow;
 
 /* obsolete as of 7.3: */
 static Oid	g_last_builtin_oid; /* value of the last builtin oid */
@@ -198,6 +199,7 @@
 		{"no-owner", no_argument, NULL, 'O'},
 		{"port", required_argument, NULL, 'p'},
 		{"schema", required_argument, NULL, 'n'},
+		{"convert-now", no_argument, NULL, 'N'},
 		{"schema-only", no_argument, NULL, 's'},
 		{"superuser", required_argument, NULL, 'S'},
 		{"table", required_argument, NULL, 't'},
@@ -233,7 +235,7 @@
 	g_comment_end[0] = '\0';
 	strcpy(g_opaque_type, "opaque");
 
-	dataOnly = schemaOnly = dumpData = attrNames = false;
+	dataOnly = schemaOnly = dumpData = attrNames = convertNow = false;
 
 	progname = get_progname(argv[0]);
 
@@ -258,7 +260,7 @@
 		}
 	}
 
-	while ((c = getopt_long(argc, argv, "abcCdDf:F:h:in:oOp:RsS:t:uU:vWxX:Z:",
+	while ((c = getopt_long(argc, argv, "abcCdDf:F:h:in:NoOp:RsS:t:uU:vWxX:Z:",
 							long_options, &optindex)) != -1)
 	{
 		switch (c)
@@ -310,6 +312,10 @@
 				selectSchemaName = strdup(optarg);
 				break;
 
+			case 'N':			/* convert DEFAULT 'now' to DEFAULT now() */
+				convertNow = true;
+				break;
+
 			case 'o':			/* Dump oids */
 				oids = true;
 				break;
@@ -640,6 +646,7 @@
 	printf(_("  -d, --inserts            dump data as INSERT, rather than COPY, commands\n"));
 	printf(_("  -D, --column-inserts     dump data as INSERT commands with column names\n"));
 	printf(_("  -n, --schema=SCHEMA      dump the named schema only\n"));
+	printf(_("  -N, --convert-now        convert DEFAULT 'now' to DEFAULT now()\n"));
 	printf(_("  -o, --oids               include OIDs in dump\n"));
 	printf(_("  -O, --no-owner           do not output commands to set object ownership\n"
 			 "                           in plain text format\n"));
@@ -672,6 +679,19 @@
 }
 
 /*
+ * handleConvertNow: called on DEFAULT arguments in table column definitions;
+ * if conversion is enabled, returns now() instead of 'now'
+ */
+const char*
+handleConvertNow(const char* value)
+{
+    if( convertNow && !strcmp(value,"'now'"))
+	return "now()";
+    else
+	return value;
+}
+
+/*
  * selectDumpableNamespace: policy-setting subroutine
  *		Mark a namespace as to be dumped or not
  */
@@ -5341,7 +5361,7 @@
 					!tbinfo->inhAttrDef[j] &&
 					!tbinfo->attisserial[j])
 					appendPQExpBuffer(q, " DEFAULT %s",
-									  tbinfo->adef_expr[j]);
+						handleConvertNow( tbinfo->adef_expr[j] ) );
 
 				/*
 				 * Not Null constraint --- suppress if inherited
