[HACKERS] createlang/droplang -l outputs

2007-08-09 Thread Tomoaki Sato
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.c14 Jul 2006 14:52:27 -  1.24
+++ src/bin/scripts/createlang.c9 Aug 2007 14:46:31 -
@@ -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 -  1.21
+++ src/bin/scripts/droplang.c  9 Aug 2007 14:46:31 -
@@ -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 [EMAIL PROTECTED]
SRA OSS, Inc. Japan

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [HACKERS] createlang/droplang -l outputs

2007-08-09 Thread Tom Lane
Tomoaki Sato [EMAIL PROTECTED] 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

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
   choose an index scan if your joining column's datatypes do not
   match