Re: [SQL] US Date Style - Mailing list pgsql-general

From Steve Wolfe
Subject Re: [SQL] US Date Style
Date
Msg-id 002201bfb082$a385b870$85755ad1@iboats.com
Whole thread Raw
In response to [SQL] US Date Style  (ditilupi <gme@ufba.br>)
List pgsql-general
> I'm having this problem with date fields. I'm using the
Postgresql7.0beta4
> and programming in PHP3. When I set the environment variable PGDATESTYLE
> to "NonEuropean,SQL" it works, but only if I'm in the Pgsql environment.
> When I access through the PHP3 it doesn't work.
>
> Does anybody have any suggestion that could help me?

  When you access is via the PHP interface (which, I assume, is running as
a CGI program), then you are not running as pgsql, and so any settings
you've put into pgsql's startup scripts will not take effect.  Determine
which user is actually executing the code when accessed normally (hopefully
you're using some mechanism to execute scripts as the owner, in which case
it will be the owner of the file.  Otherwise it will be the user that the
web server runs as.)  Then, make the appropriate settings in the
appropriate scripts for that user.

steve


pgsql-general by date:

Previous
From: Ed Loehr
Date:
Subject: Re: ODBC Stuff
Next
From: Karel Zak
Date:
Subject: Re: [SQL] US Date Style