createlang/droplang -l outputs

Поиск
Список
Период
Сортировка
Искать

createlang/droplang -l outputs

От:
Tomoaki Sato <sato@sraoss.co.jp>
Дата:
Hi,

The header in the list of already installed languages shown by
createlang/droplang with the -l option is not printed from 8.2.

PostgreSQL 8.2: $ createlang -l  plpgsql | yes

PostgreSQL 8.1: $ createlang -l Procedural Languages   Name   | Trusted?  ---------+----------  plpgsql | yes

The structure member 'start_table' is added to the 'printTableOpt' in
the 'src/bin/psql/print.h' from 8.2. But the value of the
'start_table' is not set to true.

Regards,

Index: src/bin/scripts/createlang.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/scripts/createlang.c,v
retrieving revision 1.24
diff -u -r1.24 createlang.c
--- src/bin/scripts/createlang.c	14 Jul 2006 14:52:27 -0000	1.24
+++ src/bin/scripts/createlang.c	9 Aug 2007 14:46:31 -0000
@@ -138,6 +138,7 @@		memset(&popt, 0, sizeof(popt));		popt.topt.format = PRINT_ALIGNED;		popt.topt.border = 1;
+		popt.topt.start_table = true;		popt.topt.encoding = PQclientEncoding(conn);		popt.title = _("Procedural Languages");		printQuery(result, &popt, stdout, NULL);
Index: src/bin/scripts/droplang.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/scripts/droplang.c,v
retrieving revision 1.21
diff -u -r1.21 droplang.c
--- src/bin/scripts/droplang.c	31 May 2006 11:02:42 -0000	1.21
+++ src/bin/scripts/droplang.c	9 Aug 2007 14:46:31 -0000
@@ -149,6 +149,7 @@		memset(&popt, 0, sizeof(popt));		popt.topt.format = PRINT_ALIGNED;		popt.topt.border = 1;
+		popt.topt.start_table = true;		popt.topt.encoding = PQclientEncoding(conn);		popt.title = _("Procedural Languages");		printQuery(result, &popt, stdout, NULL);


----
Tomoaki Sato 
SRA OSS, Inc. Japan

Re: createlang/droplang -l outputs

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Tomoaki Sato  writes:
> The header in the list of already installed languages shown by
> createlang/droplang with the -l option is not printed from 8.2.

Ooops.  I seem to have missed these uses of printQuery() when we put in
the FETCH_COUNT patch last summer :-(.

> +		popt.topt.start_table = true;

It looks like stop_table has to be set true as well to match
the former formatting; compare
http://developer.postgresql.org/cvsweb.cgi/pgsql/src/bin/psql/startup.c.diff?r1=1.136;r2=1.137

Patched in HEAD and 8.2 branch.  Thanks for the report!
		regards, tom lane

FAQ