Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql General > Re: Making sure...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 7 of 13 Topic 15505 of 16301
Post > Topic >>

Re: Making sure \timing is on

by david@[EMAIL PROTECTED] (David Fetter) May 12, 2008 at 02:17 PM

--3V7upXqbjpZ4EhLz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Sun, May 11, 2008 at 11:48:29PM -0400, Tom Lane wrote:
> "Scott Marlowe" <scott.marlowe@[EMAIL PROTECTED]
> writes:
> > Is it reasonable behavior to have \timing along toggle and \timing on
> > / \timing off be a forced switch?  Just thinking of other scripts
> > where this isn't a problem and having to update them.
> 
> The command without an argument should certainly keep the old toggle
> behavior, for backwards compatibility.

Attached patch does some of the right thing, but doesn't yet handle
error cases.  How liberal should we be about capitalization, spelling,
etc.?

Cheers,
David.
-- 
David Fetter <david@[EMAIL PROTECTED]
> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@[EMAIL PROTECTED]
 to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate

--3V7upXqbjpZ4EhLz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="psql_set_timing.patch"

Index: src/bin/psql/command.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/bin/psql/command.c,v
retrieving revision 1.188
diff -r1.188 command.c
887c887,897
< 		pset.timing = !pset.timing;
---
> 		char	   *opt = psql_scan_slash_option(scan_state,
> 												 OT_NORMAL, NULL, true);
> 		if (opt)
> 		{
> 			if (strcmp(opt, "on") == 0)
> 				pset.timing = true;
> 			else if (strcmp(opt, "off") == 0)
> 				pset.timing = false;
> 		}
> 		else
> 			pset.timing = !pset.timing;

--3V7upXqbjpZ4EhLz
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
MIME-Version: 1.0


-- 
Sent via pgsql-general mailing list (pgsql-general@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

--3V7upXqbjpZ4EhLz--
 




 13 Posts in Topic:
Making sure \timing is on
lists@[EMAIL PROTECTED]   2008-05-11 19:52:00 
Re: Making sure \timing is on
tgl@[EMAIL PROTECTED] (T  2008-05-11 20:24:17 
Re: Making sure \timing is on
lists@[EMAIL PROTECTED]   2008-05-11 22:43:19 
Re: Making sure \timing is on
tgl@[EMAIL PROTECTED] (T  2008-05-11 23:04:33 
Re: Making sure \timing is on
scott.marlowe@[EMAIL PROT  2008-05-11 21:25:54 
Re: Making sure \timing is on
tgl@[EMAIL PROTECTED] (T  2008-05-11 23:48:29 
Re: Making sure \timing is on
david@[EMAIL PROTECTED]   2008-05-12 14:17:06 
Re: Making sure \timing is on
bruce@[EMAIL PROTECTED]   2008-05-12 17:30:48 
Re: Making sure \timing is on
david@[EMAIL PROTECTED]   2008-05-12 14:57:57 
Re: Making sure \timing is on
alvherre@[EMAIL PROTECTED  2008-05-13 10:26:26 
Re: Making sure \timing is on
tgl@[EMAIL PROTECTED] (T  2008-05-13 10:38:26 
Re: Making sure \timing is on
alvherre@[EMAIL PROTECTED  2008-05-13 10:47:40 
Re: Making sure \timing is on
alvherre@[EMAIL PROTECTED  2008-05-12 17:32:56 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Aug 21 22:37:07 CDT 2008.