Thread: Pgadmin III not honoring DATESTYLE
<div id="RTEContent">PostgreSQL version: 8.1.2<br />Operating system: Linux<br />Description: Pgadmin III not honoringDATESTYLE<br />Details: <br /><br />By default in postgresql.conf the DATESTYLE is set to "SQL,European" and it worksOK except for Pgadmin III.<br />When you ask for "view data" in Pgadmin III a date field shows yyyy-mm-dd instead ofdd/mm/yyyy<br />Please tell me how to fix this<br />Thank you<br /></div><p><hr size="1" />Yahoo! Photos Showcase holidaypictures in hardcover<br /><a href="http://us.rd.yahoo.com/mail_us/taglines/photobooks/*http://pa.yahoo.com/*http://us.rd.yahoo.com/mail_us/taglines/photos/evt=38088/*http://pg.photos.yahoo.com/ph//page?.file=photobook_splash.html">Photo Books</a>.You design it and well bind it!
From: pgadmin-support-owner@postgresql.org [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of Francisco Leovey
Sent: 18 January 2006 12:01
To: pgadmin-support@postgresql.org
Subject: [pgadmin-support] Pgadmin III not honoring DATESTYLEPostgreSQL version: 8.1.2
Operating system: Linux
Description: Pgadmin III not honoring DATESTYLE
Details:
By default in postgresql.conf the DATESTYLE is set to "SQL,European" and it works OK except for Pgadmin III.
When you ask for "view data" in Pgadmin III a date field shows yyyy-mm-dd instead of dd/mm/yyyy
Please tell me how to fix this
pgAdmin works with DATESTYLE=ISO to ensure that dates cannot be misinterpreted when using servers with different settings. Supporting differing datestyles on different servers is not easy to do and can lead to user confusion. As an administration tool we prefer pgAdmin to remain unambiguous rather than make it easy to unintentionally enter invalid data, or misinterpret query results.
Regards, Dave
On 1/18/06, Dave Page <dpage@vale-housing.co.uk> wrote: > By default in postgresql.conf the DATESTYLE is set to "SQL,European" and it > works OK except for Pgadmin III. > When you ask for "view data" in Pgadmin III a date field shows yyyy-mm-dd > instead of dd/mm/yyyy > Please tell me how to fix this > > pgAdmin works with DATESTYLE=ISO to ensure that dates cannot be > misinterpreted when using servers with different settings. Supporting > differing datestyles on different servers is not easy to do and can lead to > user confusion. As an administration tool we prefer pgAdmin to remain > unambiguous rather than make it easy to unintentionally enter invalid data, > or misinterpret query results. > > Regards, Dave I Don't think it's a good idea to set it's own Datestyle in pgAdmin. I work both witg psql and pgAdmin and have "German" datestyle set for database. It's not very easy to switch my mind :) between datestyles. By the way, previous versions of pgadmin (II ?) worked well. -- Alexey Vorobyevv [icq #16768917]
> -----Original Message----- > From: pgadmin-support-owner@postgresql.org > [mailto:pgadmin-support-owner@postgresql.org] On Behalf Of > Alexey Vorobyev > Sent: 19 January 2006 02:44 > To: pgadmin-support@postgresql.org > Subject: Re: [pgadmin-support] Pgadmin III not honoring DATESTYLE > > I Don't think it's a good idea to set it's own Datestyle in pgAdmin. > I work both witg psql and pgAdmin and have "German" datestyle > set for database. Psql doesn't have to deal with multiple connections to different databases, let alone different servers at once. Having had to fix the end result of the confusion that differing datestyles can cause on a multi-million row table there is no way I'd want pgAdmin to work in anything other than unambiguous ISO format. > It's not very easy to switch my mind :) between datestyles. Well, I would consider applying a patch that gave the user the option of turning on database-formatted dates, but only if it was off by default. This is not something I'm going to work on though. > By the way, previous versions of pgadmin (II ?) worked well. pgAdmin II was an entirely different application written using different technology with it's own set of problems. It certainly suffered from the ambiguity problem that is my main concern, although to a lesser extent as it only connected to one server at a time. Regards, Dave.
From: Francisco Leovey [mailto:fleovey@yahoo.com]
Sent: 20 January 2006 12:14
To: Dave Page
Subject: Re: [pgadmin-support] Pgadmin III not honoring DATESTYLEHello DaveI understand your answer, bu if you check in PgAdmin II this works fine, so it is an unexpected change. I beleive PgAdmin III should inquire from the server the setting of DATESTYLE and use it, just as before.Thanks and best regards
Hi Francisco,
pgAdmin II is a totally different codebase, which we learned a lot from. One of those things was that having differing datestyles can lead to confusion and accidental data corruption (if you've ever had to try to fix the dates in a multi-million row table you'll know where I'm coming from). As I said in an earlier email, if someone want's to write a patch that makes honouring DATESTYLE a non-default option, then we'll certainly consider including it, however this is not something I intend to work on.
Regards, Dave.
Dave Page wrote: > > > ------------------------------------------------------------------------ > *From:* Francisco Leovey [mailto:fleovey@yahoo.com] > *Sent:* 20 January 2006 12:14 > *To:* Dave Page > *Subject:* Re: [pgadmin-support] Pgadmin III not honoring DATESTYLE > > Hello Dave > > I understand your answer, bu if you check in PgAdmin II this works > fine, so it is an unexpected change. I beleive PgAdmin III should > inquire from the server the setting of DATESTYLE and use it, just as > before. > Thanks and best regards > > > Hi Francisco, > > pgAdmin II is a totally different codebase, which we learned a lot from. > One of those things was that having differing datestyles can lead to > confusion and accidental data corruption (if you've ever had to try to > fix the dates in a multi-million row table you'll know where I'm coming > from). As I said in an earlier email, if someone want's to write a patch > that makes honouring DATESTYLE a non-default option, then we'll > certainly consider including it, however this is not something I intend > to work on. Changing DATESTYLE is NOT acceptable, like we don't have an encoding option. Both ENCODING and DATESTYLE are options that are selected to guarantee a _machine_ readable format. I won't allow this to be mixed with GUI representation. However, it would be possible (actually: still planned) to have the _display_ dependent on locale settings, including usage of a date entry control. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 20 January 2006 13:11 > To: Dave Page > Cc: Francisco Leovey; pgadmin-support@postgresql.org > Subject: Re: [pgadmin-support] Pgadmin III not honoring DATESTYLE > > > pgAdmin II is a totally different codebase, which we > learned a lot from. > > One of those things was that having differing datestyles > can lead to > > confusion and accidental data corruption (if you've ever > had to try to > > fix the dates in a multi-million row table you'll know > where I'm coming > > from). As I said in an earlier email, if someone want's to > write a patch > > that makes honouring DATESTYLE a non-default option, then we'll > > certainly consider including it, however this is not > something I intend > > to work on. > > Changing DATESTYLE is NOT acceptable, like we don't have an encoding > option. Both ENCODING and DATESTYLE are options that are selected to > guarantee a _machine_ readable format. I won't allow this to be mixed > with GUI representation. I wasn't suggesting we do that, though I'll grant you I could have phrased it a whole lot better. pgAdmin will always use ISO internally, but it could - as a non-default option - display dates in the format specified by the datestyle in the edit grid etc. > However, it would be possible (actually: still planned) to have the > _display_ dependent on locale settings, including usage of a > date entry > control. Locale is definitely far more acceptable than datestyle - that would at least be consistent across all connected servers and databases which is my main concern. Magnus raised an interesting point on IM - it would be useful to honour datestyle in the query tool so that data can be exported in the desired format more easily. Regards, Dave.
Dave Page wrote: > > Magnus raised an interesting point on IM - it would be useful to honour > datestyle in the query tool so that data can be exported in the desired > format more easily. The query tools simply displays strings without interpreting them, DATESTYLE can already be used there. Regards, Andreas
> -----Original Message----- > From: Andreas Pflug [mailto:pgadmin@pse-consulting.de] > Sent: 20 January 2006 15:52 > To: Dave Page > Cc: Francisco Leovey; pgadmin-support@postgresql.org > Subject: Re: [pgadmin-support] Pgadmin III not honoring DATESTYLE > > Dave Page wrote: > > > > > Magnus raised an interesting point on IM - it would be > useful to honour > > datestyle in the query tool so that data can be exported in > the desired > > format more easily. > > The query tools simply displays strings without interpreting them, > DATESTYLE can already be used there. So it does. I must have mistyped something when I tested it earlier. /D