pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedexternal environment variable
3+ messages / 3 participants
[nested] [flat]
* external environment variable
@ 1999-04-14 03:02 Randal Flagg <flagg_randal@hotmail.com>
1999-04-14 13:40 ` Re: [SQL] external environment variable José Soares <jose@sferacarta.com>
0 siblings, 1 reply; 3+ messages in thread
From: Randal Flagg @ 1999-04-14 03:02 UTC (permalink / raw)
To: pgsql-sql
Hi!!,
I've a little problem. I've installed Apache JServ 1.03b and it
works very good, I've also installed PostreSQL 6.4 and I set the
environment variable PGDATESTYLE in the /etc/profile file. When I use
PostgreSQL directly, date's fields are shown according to the
PGDATESTYLE but, when I query a table across the Web using a Servlet
PostreSQL ignore PGDATESTYLE and use it's default.
Best regards,
Flagg_Randal@hotmail.com
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [SQL] external environment variable
1999-04-14 03:02 external environment variable Randal Flagg <flagg_randal@hotmail.com>
@ 1999-04-14 13:40 ` José Soares <jose@sferacarta.com>
0 siblings, 0 replies; 3+ messages in thread
From: José Soares @ 1999-04-14 13:40 UTC (permalink / raw)
To: Randal Flagg <flagg_randal@hotmail.com>; +Cc: pgsql-sql
Randal Flagg ha scritto:
> Hi!!,
> I've a little problem. I've installed Apache JServ 1.03b and it
> works very good, I've also installed PostreSQL 6.4 and I set the
> environment variable PGDATESTYLE in the /etc/profile file. When I use
> PostgreSQL directly, date's fields are shown according to the
> PGDATESTYLE but, when I query a table across the Web using a Servlet
> PostreSQL ignore PGDATESTYLE and use it's default.
>
use command set
Description: set run-time environment
Syntax:
SET DateStyle TO
'ISO'|'SQL'|'Postgres'|'European'|'US'|'NonEuropean'
example:
set datestyle to 'ISO';
José
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: [SQL] external environment variable
@ 1999-04-15 14:54 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 3+ messages in thread
From: Tom Lane @ 1999-04-15 14:54 UTC (permalink / raw)
To: Randal Flagg <flagg_randal@hotmail.com>; +Cc: pgsql-sql@hub.org
"Randal Flagg" <flagg_randal@hotmail.com> writes:
> I've a little problem. I've installed Apache JServ 1.03b and it
> works very good, I've also installed PostreSQL 6.4 and I set the
> environment variable PGDATESTYLE in the /etc/profile file. When I use
> PostgreSQL directly, date's fields are shown according to the
> PGDATESTYLE but, when I query a table across the Web using a Servlet
> PostreSQL ignore PGDATESTYLE and use it's default.
You didn't give any details about how the servlet is constructed,
but for anything based on libpq, the PGDATESTYLE setting at the client
is what matters, not the setting in the server machine's environment.
(libpq automatically issues SET commands for datestyle and a couple of
other variables during connection startup, using whatever values it
finds in its environment variables.)
In particular, setting /etc/profile isn't making things work the way
you want on the server machine because of putting PGDATESTYLE into
the postmaster/backend environment. Rather, it's affecting the *client*
environment in which psql or other client apps run, and that setting
is getting transmitted to the backend process.
So, either set up the environment values you want for the client servlet,
or issue the desired SET commands "by hand" within the servlet.
regards, tom lane
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~1999-04-15 14:54 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-04-14 03:02 external environment variable Randal Flagg <flagg_randal@hotmail.com>
1999-04-14 13:40 ` José Soares <jose@sferacarta.com>
1999-04-15 14:54 Re: [SQL] external environment variable Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox