On 05/03/2007 12:16, Joshua D. Drake wrote:
I didn't really explain my point here. You an use datestyle from a
session, or you can reload the server. You do not need to *restart*.
Yes, that's what I was getting at as well - I was in a hurry at the time
and "restart" was the wrong word to use.
Peter Eisentraut wrote:
Am Sonntag, 4. März 2007 17:16 schrieb Raymond O'Donnell:
Probably a silly question, but did you remember to restart the server
after changing the datestyle setting?
You don't need to do that.
I didn't really explain my point here. You an use datestyle from a
Am Sonntag, 4. März 2007 17:16 schrieb Raymond O'Donnell:
> Probably a silly question, but did you remember to restart the server
> after changing the datestyle setting?
You don't need to do that.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
---(end of br
Garry Saddington schrieb:
I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still
rendered in the format (y,m,d) . How can I change this behaviour?
regards
garry
See my answer on the Zope list. The style however influences the way
dates are parsed by default, so you nee
On 04/03/2007 19:26, Raymond O'Donnell wrote:
Ahh! Then you need to use to_char(). The datestyle setting in
http://www.postgresql.org/docs/8.2/static/functions-formatting.html
---
Raymond O'Donnell, Director of Music, Galway Cathedra
On 04/03/2007 18:56, Garry Saddington wrote:
# select now();
now
---
2007-03-04 18:07:54.626267+01
(1 row)
Which is precisely what I expect.
Which is precisely what I get, but I want 04-03-2007.
Ahh! Then you need to use to_char(). The datestyle set
On Sunday 04 March 2007 17:09, Martijn van Oosterhout wrote:
> On Sun, Mar 04, 2007 at 05:05:44PM +, Garry Saddington wrote:
> > On Sunday 04 March 2007 16:16, Raymond O'Donnell wrote:
> > > On 04/03/2007 16:16, Garry Saddington wrote:
> > > > I tried pgAdmin3 on windows to run 'select now()'
Garry Saddington wrote:
I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still
rendered in the format (y,m,d) . How can I change this behaviour?
Did you restart PostgreSQL after making the change? You can also set it
on the fly per session.
Joshua D. Drake
rega
On Sun, Mar 04, 2007 at 05:05:44PM +, Garry Saddington wrote:
> On Sunday 04 March 2007 16:16, Raymond O'Donnell wrote:
> > On 04/03/2007 16:16, Garry Saddington wrote:
> > > I tried pgAdmin3 on windows to run 'select now()' and it still does not
> > > return the correct datestyle.
> >
> > Pro
On Sunday 04 March 2007 16:16, Raymond O'Donnell wrote:
> On 04/03/2007 16:16, Garry Saddington wrote:
> > I tried pgAdmin3 on windows to run 'select now()' and it still does not
> > return the correct datestyle.
>
> Probably a silly question, but did you remember to restart the server
> after cha
On 04/03/2007 16:16, Garry Saddington wrote:
I tried pgAdmin3 on windows to run 'select now()' and it still does not
return the correct datestyle.
Probably a silly question, but did you remember to restart the server
after changing the datestyle setting?
Ray.
-
On Sunday 04 March 2007 15:28, Raymond O'Donnell wrote:
> On 04/03/2007 12:58, Jorge Godoy wrote:
> > Garry Saddington <[EMAIL PROTECTED]> writes:
> >> I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is
> >> still rendered in the format (y,m,d) . How can I change this behaviou
On 04/03/2007 12:58, Jorge Godoy wrote:
Garry Saddington <[EMAIL PROTECTED]> writes:
I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still
rendered in the format (y,m,d) . How can I change this behaviour?
ISO means y-m-d...
The default postgresql.conf that is ins
Garry Saddington <[EMAIL PROTECTED]> writes:
> I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is
> still
> rendered in the format (y,m,d) . How can I change this behaviour?
ISO means y-m-d...
--
Jorge Godoy <[EMAIL PROTECTED]>
---(end of
I have 'datestyle ISO,DMY' set in postgresql.conf but the date output is still
rendered in the format (y,m,d) . How can I change this behaviour?
regards
garry
---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropr
David Rysdam wrote:
David Rysdam wrote:
I could swear (but I don't think I can prove at this point) that 8.0
beta3 returned timestamps with milliseconds, like this:
-MM-DD HH24:MI:SS.MS
But 8.1 isn't doing that. I see functions to format the date, but
that would require me to change a
David Rysdam wrote:
I could swear (but I don't think I can prove at this point) that 8.0
beta3 returned timestamps with milliseconds, like this:
-MM-DD HH24:MI:SS.MS
But 8.1 isn't doing that. I see functions to format the date, but
that would require me to change all my existing SQL to
I could swear (but I don't think I can prove at this point) that 8.0
beta3 returned timestamps with milliseconds, like this:
-MM-DD HH24:MI:SS.MS
But 8.1 isn't doing that. I see functions to format the date, but that
would require me to change all my existing SQL to specifically ask for
On Wed, Oct 13, 2004 at 03:37:14PM -0400, David Rysdam wrote:
> Michael Fuhr wrote:
> >
> >I'd probably choose to extend PostgreSQL rather than hack what
> >already exists, though.
>
> By "extend PostgreSQL" do you mean create a custom input_function for
> timestamp? Are there docs that give hint
On Wed, Oct 13, 2004 at 08:36:50PM +0200, Pierre-Fr?d?ric Caillaud wrote:
>
> You can have your script make a query in the database to fetch the
> data types of the fields and then know which ones are to be transformed
> and how. The script would take as arguments a dump file and a
Michael Fuhr wrote:
On Wed, Oct 13, 2004 at 01:32:01PM -0400, David Rysdam wrote:
Michael Fuhr wrote:
You could filter the data through a script that reformats certain
fields, then feed the reformatted data to PostgreSQL. This is
usually a trivial task for Perl, awk, sed, or the like.
Right, I *can* do this. But then I have to build knowledge into that
script so it can find each of these date fields (there's like 20 of them
across 10 different files) and then update that knowledge each time it
changes.
In your case that's a reasonable argument against filtering the
data with a
On Wed, Oct 13, 2004 at 01:32:01PM -0400, David Rysdam wrote:
> Michael Fuhr wrote:
> >You could filter the data through a script that reformats certain
> >fields, then feed the reformatted data to PostgreSQL. This is
> >usually a trivial task for Perl, awk, sed, or the like.
> >
> Right, I *can*
Greg Stark wrote:
David Rysdam <[EMAIL PROTECTED]> writes:
In my brute force port, I just bulk copied the date
fields into temporary tables and then did a to_timestamp(field, 'Mon DD
HH:MI:SS:MSAM').
Again, I created a temporary table and did a decode(field, 'hex') to the
real tabl
Michael Fuhr wrote:
On Wed, Oct 13, 2004 at 10:06:58AM -0400, David Rysdam wrote:
Sybase bulk copies the date fields out in this format:
Mar 4 1973 10:28:00:000AM
Postgresql's COPY (or psql \copy) doesn't like that format.
You could filter the data through a script that reformats certain
f
On Wed, Oct 13, 2004 at 10:06:58AM -0400, David Rysdam wrote:
> Sybase bulk copies the date fields out in this format:
>
> Mar 4 1973 10:28:00:000AM
>
> Postgresql's COPY (or psql \copy) doesn't like that format.
You could filter the data through a script that reformats certain
fields, then fe
David Rysdam <[EMAIL PROTECTED]> writes:
> In my brute force port, I just bulk copied the date
> fields into temporary tables and then did a to_timestamp(field, 'Mon DD
> HH:MI:SS:MSAM').
> Again, I created a temporary table and did a decode(field, 'hex') to the
> real table.
This is the
I have a large amount of data that I copy in and out of Sybase very
often. Now I also want to copy this data in and out of postgres. I
have an existing script that creates the entire database(s) from scratch
in Sybase and then uses the Sybase bulk copy tool "bcp" to copy the data
in.
I alre
helps
Anand Raman
- Original Message -
From: Bill Barnes <[EMAIL PROTECTED]>
To: Anand Raman <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, May 03, 2000 1:51 PM
Subject: RE: [GENERAL] date format problem
> Hello Anand:
>
> Thanks for the input.
>
= Original Message From "Anand Raman" <[EMAIL PROTECTED]> =
>>HI bill
>>Try to cast the field to the datetime type
>>
>>'ur_string_goes_here'::datetime
>>
>>Hope this will help
>>Anand Raman
>>
>>----- Original Messag
'::datetime
>
>Hope this will help
>Anand Raman
>
>- Original Message -
>From: Bill Barnes <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, April 28, 2000 6:09 PM
>Subject: [GENERAL] date format problem
>
>
>> Hello List:
>
HI bill
Try to cast the field to the datetime type
'ur_string_goes_here'::datetime
Hope this will help
Anand Raman
- Original Message -
From: Bill Barnes <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 28, 2000 6:09 PM
Subject: [GENERAL] date fo
Using 6.5.3 on SuSE 6.4 and program kpgsql.
Dumped data to a ';' delimited file wherein the date looks like
'1997-12-27'. The date field may be null.
Created the appropriate table using variously date/datetime/timestamp for
data type, set datestyle to ISO/SQL/others.
The copy command is
Someone posted a message here asking how you set the date style. We went
through
- environment variable PGDATESTYLE
- SET DateStyle TO
- the -e flag to the backend
but of course if you are using ISO it isn't necessary!! There is no
ambiguity in
test=> create table tab (t datetime);
CREATE
34 matches
Mail list logo