Skip site navigation (1) Skip section navigation (2)

Re: pgAdmin III commit: Revert the previous change that introduced sysSetti

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Peter Geoghegan <peter(dot)geoghegan86(at)gmail(dot)com>
Cc: pgadmin-hackers(at)postgresql(dot)org
Subject: Re: pgAdmin III commit: Revert the previous change that introduced sysSetti
Date: 2011-02-18 16:48:57
Message-ID: AANLkTikFAPXBH6BnRJ5O356uoT3iE1sY9Q6JHwdkm5dW@mail.gmail.com (view raw or flat)
Thread:
Lists: pgadmin-hackers
On Fri, Feb 18, 2011 at 2:50 PM, Peter Geoghegan
<peter(dot)geoghegan86(at)gmail(dot)com> wrote:
> Uh, it just occurred to me that without exceptions, there is no
> compelling way to report a failure from Read() variants. Qt does
> things like returning default constructed variables, that have values
> of 0 in the event of a failure. What do you think of that? Failures
> presumably more or less never occur with Read() overloads as things
> stand.

We generally do the same (the Read() functions tend to take a third
parameter containing the default value to return). But, returning an
error isn't a problem - we pass the value we read back in a reference
passed as a parameter, and can return true or false to indicate error
or success.


-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

pgadmin-hackers by date

Next:From: Peter GeogheganDate: 2011-02-18 18:01:56
Subject: Re: pgAdmin III commit: Revert the previous change that introduced sysSetti
Previous:From: Dave PageDate: 2011-02-18 16:46:53
Subject: Re: pgAdmin III commit: Revert the previous change that introduced sysSetti

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group