summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorTom Lane2007-08-22 01:39:46 +0000
committerTom Lane2007-08-22 01:39:46 +0000
commitd321421d0a409ee4473c996fd2275df0ff215eaf (patch)
tree016bb5ca76cb61c0876dbc272eb3eb57171d68d8 /src/bin
parentfd33d90a23150dec944cdfdf4587f7770543acd1 (diff)
Simplify the syntax of CREATE/ALTER TEXT SEARCH DICTIONARY by treating the
init options of the template as top-level options in the syntax. This also makes ALTER a bit easier to use, since options can be replaced individually. I also made these statements verify that the tmplinit method will accept the new settings before they get stored; in the original coding you didn't find out about mistakes until the dictionary got invoked. Under the hood, init methods now get options as a List of DefElem instead of a raw text string --- that lets tsearch use existing options-pushing code instead of duplicating functionality.
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/pg_dump/pg_dump.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index 4d4d7f7986e..7da419db6aa 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -12,7 +12,7 @@
* by PostgreSQL
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.470 2007/08/21 01:11:21 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_dump.c,v 1.471 2007/08/22 01:39:45 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -8288,11 +8288,9 @@ dumpTSDictionary(Archive *fout, TSDictInfo * dictinfo)
PQclear(res);
+ /* the dictinitoption can be dumped straight into the command */
if (dictinfo->dictinitoption)
- {
- appendPQExpBuffer(q, ",\n OPTION = ");
- appendStringLiteralConn(q, dictinfo->dictinitoption, g_conn);
- }
+ appendPQExpBuffer(q, ",\n %s", dictinfo->dictinitoption);
appendPQExpBuffer(q, " );\n");