Re: [SQL] US Date Style

From: "Steve Wolfe" <steve(at)iboats(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: [SQL] US Date Style
Date: 2000-04-27 19:56:12
Message-ID: 002201bfb082$a385b870$85755ad1@iboats.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

> 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Manuel Lemos 2000-04-27 21:09:49 Re: [SQL] US Date Style
Previous Message Karel Zak 2000-04-27 19:48:21 Re: [SQL] US Date Style

Browse pgsql-sql by date

  From Date Subject
Next Message Manuel Lemos 2000-04-27 21:09:49 Re: [SQL] US Date Style
Previous Message Karel Zak 2000-04-27 19:48:21 Re: [SQL] US Date Style