1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

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.
This commit is contained in:
Tom Lane
2007-08-22 01:39:46 +00:00
parent fd33d90a23
commit d321421d0a
17 changed files with 618 additions and 417 deletions

View File

@@ -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");