Show full path name when saving in psql

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-patches(at)postgresql(dot)org
Subject: Show full path name when saving in psql
Date: 2004-08-27 22:50:07
Message-ID: d1c6cb5213022d27ebec06ccce7a6923@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
NotDashEscaped: You need GnuPG to verify this message


This patch shows the full path name when doing a \s in psql,
if you have previously issued a \cd command.

--
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200408271849


Index: command.c
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/bin/psql/command.c,v
retrieving revision 1.123
diff -c -r1.123 command.c
*** command.c 13 Aug 2004 14:47:23 -0000 1.123
--- command.c 27 Aug 2004 19:15:41 -0000
***************
*** 258,263 ****
--- 258,266 ----
success = false;
}

+ pset.dirname = pg_strdup(dir);
+ canonicalize_path(pset.dirname);
+
if (opt)
free(opt);
}
***************
*** 643,649 ****
success = saveHistory(fname ? fname : "/dev/tty");

if (success && !quiet && fname)
! printf(gettext("Wrote history to file \"%s\".\n"), fname);
free(fname);
}

--- 646,653 ----
success = saveHistory(fname ? fname : "/dev/tty");

if (success && !quiet && fname)
! printf(gettext("Wrote history to file \"%s/%s\".\n"),
! pset.dirname ? pset.dirname : ".", fname);
free(fname);
}




-----BEGIN PGP SIGNATURE-----

iD8DBQFBL7rcvJuQZxSWSsgRArEzAJ46xxARaVVfeVmx/Ivjzr0+2iIsTACdHFgz
vFutaRJp5l/+Plmc4Q7CM9o=
=ibcl
-----END PGP SIGNATURE-----

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Jonathan Gardner 2004-08-27 23:18:32 Re: Contrib -- PostgreSQL shared variables
Previous Message Ed L. 2004-08-27 22:34:07 Re: log_filename_prefix --> log_filename + strftime()