Thread: Timezones on Tru64 (Digital Unix)

Timezones on Tru64 (Digital Unix)

From
Stephane Bortzmeyer
Date:
'set time zone 'GMT';', or any other 'set time zone' (even with numeric time
zones), is completely ignored on my Tru64 machine (I always get dates in local
time, UT+2). On Debian, everything is fine.

Did I forget something when compiling PostgreSQL? Is there something broken on
Tru64?

PostgreSQL 6.5. config.status follows:

./configure  --with-template=alpha_cc --with-CC=cc --without-CXX \
     --enable-locale --enable-cassert \
     --with-perl --with-tcl --with-jdbc \
     --with-x --with-pgport=5435



Re: Timezones on Tru64 (Digital Unix)

From
Stephane Bortzmeyer
Date:
On Tuesday 23 May 2000, at 14 h 17, the keyboard of Stephane Bortzmeyer
<bortzmeyer@pasteur.fr> wrote:

> PostgreSQL 6.5.

And for those who wonder why I don't use 6.5.3, it's because, unlike 6.5, it doesn't compile on Tru64:

cc -I../../../include -I../../../backend   -DNOFIXADE -std -O4 -Olimit 2000 -I../../../interfaces/libpq
-I../../../include-I../../../backend -c -o pl_parse.o pl_gram.c 
cc: Info: /usr/local/lib/bison.simple, line 300: In this statement, for the function "alloca", the implicit return type
of"int" is not consistent with the expected type of "pointer to void".  It will be treated as an ordinary implicitly
definedexternal function. (bltinimplret) 
      plpgsql_yyss = (short *) alloca (plpgsql_yystacksize * sizeof (*plpgsql_yyssp));
-------------------------------^
cc -I../../../include -I../../../backend   -DNOFIXADE -std -O4 -Olimit 2000 -I../../../interfaces/libpq
-I../../../include-I../../../backend   -c pl_handler.c -o pl_handler.o 
cc -I../../../include -I../../../backend   -DNOFIXADE -std -O4 -Olimit 2000 -I../../../interfaces/libpq
-I../../../include-I../../../backend   -c pl_comp.c -o pl_comp.o 
cc: Error: pl_comp.c, line 72: The type of the tentatively-defined variable "plpgsql_yytext" is incomplete at the end
ofthe compilation unit. (incomptent) 
char    plpgsql_yytext[];
--------^
make[3]: *** [pl_comp.o] Error 1
make[3]: Leaving directory `/local/packages/postgresql-6.5.3/src/pl/plpgsql/src'
make[2]: [all] Error 2 (ignored)
make[2]: Leaving directory `/local/packages/postgresql-6.5.3/src/pl/plpgsql'
make[1]: Leaving directory `/local/packages/postgresql-6.5.3/src/pl'



Re: Timezones on Tru64 (Digital Unix)

From
Tom Lane
Date:
Stephane Bortzmeyer <bortzmeyer@pasteur.fr> writes:
> And for those who wonder why I don't use 6.5.3, it's because, unlike
> 6.5, it doesn't compile on Tru64:

So have you tried 7.0 ?

Reports of porting problems for 7.0 will be gladly accepted, but you
are a few months too late to attract much interest in fixing such
glitches in 6.5.* ...

            regards, tom lane

Re: Timezones on Tru64 (Digital Unix)

From
SL Baur
Date:
Tom Lane <tgl@sss.pgh.pa.us> writes in pgsql-general@postgresql.org:

> Stephane Bortzmeyer <bortzmeyer@pasteur.fr> writes:
>> And for those who wonder why I don't use 6.5.3, it's because, unlike
>> 6.5, it doesn't compile on Tru64:

7.0 builds fine on Tru64.

> So have you tried 7.0 ?

I just did and it doesn't work.  I've built with locale and multibyte
enabled and tested in both C locale and a Japanese locale.

steve=# select now();
          now
------------------------
 2000-05-24 15:11:10+09
(1 row)

steve=# set timezone='US/Pacific';
SET VARIABLE
steve=# select now();
          now
------------------------
 2000-05-24 15:11:20+09
(1 row)

Re: Timezones on Tru64 (Digital Unix)

From
SL Baur
Date:
SL Baur <steve@beopen.com> writes in pgsql-general@postgresql.org:

> I just did and it doesn't work.

Oops.  I didn't check carefully enough.  Sorry.

> steve=# set timezone='US/Pacific';

That's incorrect syntax, it appears.  Setting the timezone as `PST8PDT'
or `:US/Pacific' works.

To answer the original question, GMT is named `GMT0' on Tru64.

steve=# set timezone='GMT0';
SET VARIABLE
steve=# select now();
          now
------------------------
 2000-05-24 07:04:37+00
(1 row)


Re: Timezones on Tru64 (Digital Unix)

From
Stephane Bortzmeyer
Date:
On Wednesday 24 May 2000, at 16 h 8, the keyboard of SL Baur <steve@beopen.com>
 wrote:

> To answer the original question, GMT is named `GMT0' on Tru64.

It works fine, even on 6.5. I love portability on Unix :-} I noticed that PostgreSQL's documentation warns about the
factthat the is no standard naming of timezones but I would never have thought that GMT is not standard! 

Many thanks.



Re: Timezones on Tru64 (Digital Unix)

From
Tom Lane
Date:
SL Baur <steve@beopen.com> writes:
> Oops.  I didn't check carefully enough.  Sorry.
>> steve=# set timezone='US/Pacific';
> That's incorrect syntax, it appears.  Setting the timezone as `PST8PDT'
> or `:US/Pacific' works.

Looking at the code, it seems that 'set timezone' is implemented
directly as setting the TZ environment variable in the server.
So whatever timezone names are known to your local tzset() are the
ones that should work.  I'd expect names like `PST8PDT' to be
pretty standard, other names less so...

            regards, tom lane