| From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> | 
|---|---|
| To: | Greg Sabino Mullane <greg(at)turnstep(dot)com> | 
| Cc: | pgsql-patches(at)postgresql(dot)org | 
| Subject: | Re: psql \x bug | 
| Date: | 2005-09-22 15:51:53 | 
| Message-ID: | 200509221551.j8MFpr613391@candle.pha.pa.us | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-patches | 
Patch applied.  Thanks.
---------------------------------------------------------------------------
Greg Sabino Mullane wrote:
[ There is text before PGP section. ]
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> NotDashEscaped: You need GnuPG to verify this message
> 
> 
> Fix two instances of using raw "puts" inside of specifying fout.
> The second one caused a bug that can be seen by using the pager
> in expanded output mode:
> 
> $ psql pgtest
> 
> pgtest> \x
> Expanded display is on.
> pgtest> SELECT * FROM pg_class LIMIT 2;
> 
> (messy output)
> 
> --
> Greg Sabino Mullane greg(at)turnstep(dot)com
> PGP Key: 0x14964AC8 200509161020
> https://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
> 
> 
> Index: print.c
> ===================================================================
> RCS file: /projects/cvsroot/pgsql/src/bin/psql/print.c,v
> retrieving revision 1.72
> diff -c -r1.72 print.c
> *** print.c     18 Jul 2005 20:57:53 -0000      1.72
> --- print.c     16 Sep 2005 14:18:04 -0000
> ***************
> *** 570,576 ****
> 
>         if (cells[0] == NULL)
>         {
> !               puts(_("(No rows)\n"));
>                 return;
>         }
> 
> --- 570,576 ----
> 
>         if (cells[0] == NULL)
>         {
> !               fprintf(fout, _("(No rows)\n"));
>                 return;
>         }
> 
> ***************
> *** 704,710 ****
>                         if (opt_align[i % col_count] == 'r' && opt_numeric_locale)
>                             format_numeric_locale(my_cell);
>                         if (opt_border < 2)
> !                               puts(my_cell);
>                         else
>                                 fprintf(fout, "%-s%*s |\n", my_cell, dwidth - cell_w[i], "");
>                         free(my_cell);
> --- 704,710 ----
>                         if (opt_align[i % col_count] == 'r' && opt_numeric_locale)
>                             format_numeric_locale(my_cell);
>                         if (opt_border < 2)
> !                               fprintf(fout, "%s\n", my_cell);
>                         else
>                                 fprintf(fout, "%-s%*s |\n", my_cell, dwidth - cell_w[i], "");
>                         free(my_cell);
> -----BEGIN PGP SIGNATURE-----
> 
> iEYEARECAAYFAkMq1REACgkQvJuQZxSWSsjIGgCeIE1CONuRu31KZuJLAcNZT1VI
> sysAoK6Pi5NXYPBC/0oNhmQKqZqca5jw
> =W9GE
> -----END PGP SIGNATURE-----
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster
> 
-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman(at)candle(dot)pha(dot)pa(dot)us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Treat | 2005-09-22 16:00:08 | Re: [PORTS] Solaris - psql returns 0 instead of 1 for file not found. | 
| Previous Message | ITAGAKI Takahiro | 2005-09-22 04:58:07 | Cleanup of access to ItemIdData |