Thread: DataStyle

DataStyle

From
Remigiusz Sokolowski
Date:
Hi!
I did something like that:
torell=> set DataStyle to 'ISO';

and get something like this:
NOTICE:  Unrecognized variable datastyle
SET VARIABLE

I try also with 'European' DataStyle - I remeber, that sometime ago this
command functions OK, and we've made no changes in configuration of
database.

So my question is:
If there is a way to set DataStyle manually?
And if it is possible to set it default 'European' to all users?
As I saw it seems, that every user has its own settings of this.TIARem

-------------------------------------------------------------------*------------
Remigiusz Sokolowski      e-mail: rems@gdansk.sprint.pl           * *        
-----------------------------------------------------------------*****----------



Re: [SQL] DataStyle

From
"Emils Klotins"
Date:
[10 Jun 99,, 11:57] Remigiusz Sokolowski wrote:

> Hi!
> I did something like that:
> torell=> set DataStyle to 'ISO';
> 
> and get something like this:
> NOTICE:  Unrecognized variable datastyle
> SET VARIABLE
I believe it should be DatEstyle not DatAstyle.
For dates.




Emils Klotins       e-mail: emils@mail.usis.bkc.lv
Systems Manager     URL: http://www.usis.bkc.lv/
USIS Riga           7 Smilsu Str., Riga LV1050, LATVIA



Re: [SQL] DataStyle

From
José Soares
Date:
Remigiusz Sokolowski ha scritto:

> Hi!
> I did something like that:
> torell=> set DataStyle to 'ISO';
>
> and get something like this:
> NOTICE:  Unrecognized variable datastyle
> SET VARIABLE
>
> I try also with 'European' DataStyle - I remeber, that sometime ago this
> command functions OK, and we've made no changes in configuration of
> database.
>

hygea=> set DateStyle to 'ISO';
SET VARIABLE


>
> So my question is:
> If there is a way to set DataStyle manually?
> And if it is possible to set it default 'European' to all users?
> As I saw it seems, that every user has its own settings of this.
>         TIA
>         Rem
>

You can do this job in three different ways:
                    1. Setting PGDATESTYLE environment variable for everey client
as:                       export PGDATESTYLE='sql,european'   # this format is:
dd/mm/yyyy
                    2. Running postmaster using -oe parameter to set format                       date to 'European'
convention.
                    3. Changing the following variables:                       bool EuroDates = true / false
          int  DateStyle =                                        USE_ISO_DATES
USE_POSTGRES_DATES                                       USE_ISO_DATES
USE_SQL_DATES                                       USE_GERMAN_DATES                       on
~/src/backend/utils/init/globals.cfile before PostgreSQL
 
installation).

______________________________________________________________
PostgreSQL 6.5.0 on i586-pc-linux-gnu, compiled by gcc 2.7.2.3
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Jose'