Обсуждение: Date formats

Поиск
Список
Период
Сортировка

Date formats

От
Michelle Murrain
Дата:
In doing an upgrade (I'm using Debian testing, and a recent
dist-upgrade included an upgrade to 7.3.2), I must have messed up the
date/time format - because one table did not automatically restore,
and in trying to restore that table from my own backup, it is giving
me the error "Bad Timestamp external representation"

I thought I was being careful to pick the right formats during the
upgrade,  but obviously I screwed up.

How can I fix this (besides writing a script to just insert the
records sans timestamp or converting the timestamp)?

1) the old timestamp format is MM/DD/YYYY hh:mm:ss

How can I find out what the new format is? Can I convert it to the
old (by doing an new initdb?)

Thanks for any tips!
--
.Michelle

--------------------------
Michelle Murrain, Technology Consulting
tech at murrain dot net     http://www.murrain.net
413-253-2874 ph
413-222-6350 cell
413-825-0288 fax
AIM:pearlbear0 Y!:pearlbear9 ICQ:129250575
SMS: 4132226350 at messaging dot sprintpcs dot com

"I am determined to cultivate only thoughts that increase trust and
love, to use my hands to perform only deeds that build community, to
speak only words of harmony and aid." - Thich Nhat Hanh

Max number of client connections...

От
"rakesh"
Дата:
Hello Everybody,

I'm new to this list. My postgresql 7.1 (RHL -7.2& server does not respond
when quiet some connections
are made. Do I need to change the max_connections option in postgresql.conf,
but surprisingly it is commented.

In this case what is the default number of connections to which it can
respond? And also if i need to increase the number of connections what do i
need to do?

Help appreciated !!!

regards,

Rakesh Pawar.





Re: Max number of client connections...

От
Andrew Biagioni
Дата:
THe way the .conf file is structured is, that each option is commented out when
its default value applies, but the default value is the value shown for the
option in the .conf file -- so it would be the same if you un-commented the
line.

To change the value, you un-comment the line and change the value for the
parameter in that line.

I don't have a 7.1 postgresql.conf file handy, so I can't give you an exact
example, but if you currently have:

#max_connections = xx

then the default is xx maximum connections.  To set the maximum to yy, change
the line to:

max_connections = yy

Otherwise you can do as I do, and leave the commented-out line and follow it
with a comment and a new line:

#max_connections = xx
# Added andrew.biagioni@e-greek.net on 5/5/2002:
max_connections = yy

This allows me to keep a reminder of what the default was, which is what I
would have if I removed MY line.

Happy PostgreSQLing,

        Andrew

5/27/03 2:14:24 AM, "rakesh" <rakesh@cygnus.stpp.soft.net> wrote:

>Hello Everybody,
>
>I'm new to this list. My postgresql 7.1 (RHL -7.2& server does not respond
>when quiet some connections
>are made. Do I need to change the max_connections option in postgresql.conf,
>but surprisingly it is commented.
>
>In this case what is the default number of connections to which it can
>respond? And also if i need to increase the number of connections what do i
>need to do?
>
>Help appreciated !!!
>
>regards,
>
>Rakesh Pawar.
>
>
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo@postgresql.org so that your
>message can get through to the mailing list cleanly
>
>




Re: Max number of client connections...

От
"rakesh"
Дата:
Hello,

Thanks I did it also in addition to it i had to double the shared buffer
size.
It now seems to be working fine.

regards,
Rakesh P.

----- Original Message -----
From: "Andrew Biagioni" <andrew.biagioni@e-greek.net>
To: <pgsql-admin@postgresql.org>; "rakesh" <rakesh@cygnus.stpp.soft.net>
Sent: Tuesday, May 27, 2003 7:06 PM
Subject: Re: [ADMIN] Max number of client connections...


> THe way the .conf file is structured is, that each option is commented out
when
> its default value applies, but the default value is the value shown for
the
> option in the .conf file -- so it would be the same if you un-commented
the
> line.
>
> To change the value, you un-comment the line and change the value for the
> parameter in that line.
>
> I don't have a 7.1 postgresql.conf file handy, so I can't give you an
exact
> example, but if you currently have:
>
> #max_connections = xx
>
> then the default is xx maximum connections.  To set the maximum to yy,
change
> the line to:
>
> max_connections = yy
>
> Otherwise you can do as I do, and leave the commented-out line and follow
it
> with a comment and a new line:
>
> #max_connections = xx
> # Added andrew.biagioni@e-greek.net on 5/5/2002:
> max_connections = yy
>
> This allows me to keep a reminder of what the default was, which is what I
> would have if I removed MY line.
>
> Happy PostgreSQLing,
>
> Andrew
>
> 5/27/03 2:14:24 AM, "rakesh" <rakesh@cygnus.stpp.soft.net> wrote:
>
> >Hello Everybody,
> >
> >I'm new to this list. My postgresql 7.1 (RHL -7.2& server does not
respond
> >when quiet some connections
> >are made. Do I need to change the max_connections option in
postgresql.conf,
> >but surprisingly it is commented.
> >
> >In this case what is the default number of connections to which it can
> >respond? And also if i need to increase the number of connections what do
i
> >need to do?
> >
> >Help appreciated !!!
> >
> >regards,
> >
> >Rakesh Pawar.
> >
> >
> >
> >
> >
> >---------------------------(end of broadcast)---------------------------
> >TIP 3: if posting/reading through Usenet, please send an appropriate
> >subscribe-nomail command to majordomo@postgresql.org so that your
> >message can get through to the mailing list cleanly
> >
> >
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster


Re: Date formats

От
Oliver Elphick
Дата:
On Mon, 2003-05-26 at 18:20, Michelle Murrain wrote:
> In doing an upgrade (I'm using Debian testing, and a recent
> dist-upgrade included an upgrade to 7.3.2), I must have messed up the
> date/time format - because one table did not automatically restore,
> and in trying to restore that table from my own backup, it is giving
> me the error "Bad Timestamp external representation"
>
> I thought I was being careful to pick the right formats during the
> upgrade,  but obviously I screwed up.
>
> How can I fix this (besides writing a script to just insert the
> records sans timestamp or converting the timestamp)?
>
> 1) the old timestamp format is MM/DD/YYYY hh:mm:ss
>
> How can I find out what the new format is? Can I convert it to the
> old (by doing an new initdb?)

That format is OK, provided that you have the correct datestyle set:

        junk=# show datestyle;
                   DateStyle
        -------------------------------
         ISO with European conventions
        (1 row)

        junk=# select '12/13/2003 13:43:23'::timestamp;
        ERROR:  Bad timestamp external representation '12/13/2003 13:43:23'
        junk=# set datestyle to US;
        SET
        junk=# show datestyle;
                       DateStyle
        ---------------------------------------
         ISO with US (NonEuropean) conventions
        (1 row)

        junk=# select '12/13/2003 13:43:23'::timestamp;
              timestamp
        ---------------------
         2003-12-13 13:43:23
        (1 row)

The problem is probably that you have European conventions set, and it
is confusing month and day.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Thou will show me the path of life; in thy presence
      is fullness of joy; at thy right hand there are
      pleasures for evermore."         Psalms 16:11