pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feeddatestyle setting
6+ messages / 3 participants
[nested] [flat]
* datestyle setting
@ 2005-03-09 06:05 Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 06:27 ` Re: datestyle setting Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 6+ messages in thread
From: Kenneth Gonsalves @ 2005-03-09 06:05 UTC (permalink / raw)
To: pgsql-sql
hi,
i have a website with a postgresql backend. Being a shared site, i
have no root access. i do have shell access to the database, but
cannot create or drop the database. I access the database through
python scripts using the psycopg adapter. My question is, how do i
set the pgdatestyle in the database as 'European,sql'?
--
regards
kg
http://www.livejournal.com/users/lawgon
tally ho! http://avsap.sourceforge.net
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: datestyle setting
2005-03-09 06:05 datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
@ 2005-03-09 06:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-03-09 07:21 ` Re: datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
0 siblings, 1 reply; 6+ messages in thread
From: Tom Lane @ 2005-03-09 06:27 UTC (permalink / raw)
To: Kenneth Gonsalves <lawgon@thenilgiris.com>; +Cc: pgsql-sql
Kenneth Gonsalves <lawgon@thenilgiris.com> writes:
> i have a website with a postgresql backend. Being a shared site, i
> have no root access. i do have shell access to the database, but
> cannot create or drop the database. I access the database through
> python scripts using the psycopg adapter. My question is, how do i
> set the pgdatestyle in the database as 'European,sql'?
If it's a reasonably recent version of PG, either ALTER DATABASE SET
or ALTER USER SET might serve.
regards, tom lane
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: datestyle setting
2005-03-09 06:05 datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 06:27 ` Re: datestyle setting Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-03-09 07:21 ` Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 08:10 ` Re: datestyle setting Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 6+ messages in thread
From: Kenneth Gonsalves @ 2005-03-09 07:21 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-sql
On Wednesday 09 Mar 2005 11:57 am, Tom Lane wrote:
> Kenneth Gonsalves <lawgon@thenilgiris.com> writes:
> > i have a website with a postgresql backend. Being a shared site,
> > i have no root access. i do have shell access to the database,
> > but cannot create or drop the database. I access the database
> > through python scripts using the psycopg adapter. My question is,
> > how do i set the pgdatestyle in the database as 'European,sql'?
>
> If it's a reasonably recent version of PG, either ALTER DATABASE
> SET or ALTER USER SET might serve.
postgresql 7.4. when i type:
alter database set datestyle to 'European'
i get 'syntax error at or near "datestyle" at character 20'
--
regards
kg
http://www.livejournal.com/users/lawgon
tally ho! http://avsap.sourceforge.net
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: datestyle setting
2005-03-09 06:05 datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 06:27 ` Re: datestyle setting Tom Lane <tgl@sss.pgh.pa.us>
2005-03-09 07:21 ` Re: datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
@ 2005-03-09 08:10 ` Richard Huxton <dev@archonet.com>
2005-03-09 09:47 ` Re: datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
0 siblings, 1 reply; 6+ messages in thread
From: Richard Huxton @ 2005-03-09 08:10 UTC (permalink / raw)
To: Kenneth Gonsalves <lawgon@thenilgiris.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-sql
Kenneth Gonsalves wrote:
> On Wednesday 09 Mar 2005 11:57 am, Tom Lane wrote:
>>
>>If it's a reasonably recent version of PG, either ALTER DATABASE
>>SET or ALTER USER SET might serve.
>
>
> postgresql 7.4. when i type:
>
> alter database set datestyle to 'European'
>
> i get 'syntax error at or near "datestyle" at character 20'
I keep making this mistake, you need to include the database name:
ALTER DATABASE my_db_name SET datestyle TO 'ISO';
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: datestyle setting
2005-03-09 06:05 datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 06:27 ` Re: datestyle setting Tom Lane <tgl@sss.pgh.pa.us>
2005-03-09 07:21 ` Re: datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 08:10 ` Re: datestyle setting Richard Huxton <dev@archonet.com>
@ 2005-03-09 09:47 ` Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 09:57 ` Re: datestyle setting Richard Huxton <dev@archonet.com>
0 siblings, 1 reply; 6+ messages in thread
From: Kenneth Gonsalves @ 2005-03-09 09:47 UTC (permalink / raw)
To: Richard Huxton <dev@archonet.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-sql
On Wednesday 09 Mar 2005 1:40 pm, Richard Huxton wrote:
>
> I keep making this mistake, you need to include the database name:
> ALTER DATABASE my_db_name SET datestyle TO 'ISO';
er ... doesnt seem to be in the docs? Anyway it worked, thanx
--
regards
kg
http://www.livejournal.com/users/lawgon
tally ho! http://avsap.sourceforge.net
ಇಂಡ್ಲಿನಕ್ಸ வாழ்க!
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: datestyle setting
2005-03-09 06:05 datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 06:27 ` Re: datestyle setting Tom Lane <tgl@sss.pgh.pa.us>
2005-03-09 07:21 ` Re: datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 08:10 ` Re: datestyle setting Richard Huxton <dev@archonet.com>
2005-03-09 09:47 ` Re: datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
@ 2005-03-09 09:57 ` Richard Huxton <dev@archonet.com>
0 siblings, 0 replies; 6+ messages in thread
From: Richard Huxton @ 2005-03-09 09:57 UTC (permalink / raw)
To: Kenneth Gonsalves <lawgon@thenilgiris.com>; +Cc: Tom Lane <tgl@sss.pgh.pa.us>; pgsql-sql
Kenneth Gonsalves wrote:
> On Wednesday 09 Mar 2005 1:40 pm, Richard Huxton wrote:
>
>
>>I keep making this mistake, you need to include the database name:
>> ALTER DATABASE my_db_name SET datestyle TO 'ISO';
>
>
> er ... doesnt seem to be in the docs? Anyway it worked, thanx
http://www.postgresql.org/docs/7.4/static/sql-alterdatabase.html
Synopsis
ALTER DATABASE name SET parameter { TO | = } { value | DEFAULT }
ALTER DATABASE name RESET parameter
--
Richard Huxton
Archonet Ltd
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2005-03-09 09:57 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-03-09 06:05 datestyle setting Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 06:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-03-09 07:21 ` Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 08:10 ` Richard Huxton <dev@archonet.com>
2005-03-09 09:47 ` Kenneth Gonsalves <lawgon@thenilgiris.com>
2005-03-09 09:57 ` Richard Huxton <dev@archonet.com>
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