Theo Galanakis Theo.Galanakis
Sun Jan 23 23:04:12 PST 2005
Thankyou for your help, setting the environment variable TZ=UTC worked.

Theo

-----Original Message-----
From: cbbrowne at ca.afilias.info [mailto:cbbrowne at ca.afilias.info] 
Sent: Friday, 21 January 2005 4:33 PM
To: Theo Galanakis
Cc: 'slony1-general at gborg.postgresql.org'; 'cbbrowne at ca.afilias.info'
Subject: RE: [Slony1-general] Slony1 init script.


>
> Hi,
> 	I got around the original issue by manually export 
> libdir=/var/lib/pgsql2/lib. However I have stumbled across the next 
> issue when running the initialization script.
>
> <stdin>:50: PGRES_FATAL_ERROR select "_slony_example".storeNode_int(1, 
> 'Master Node'); select "_slony_example".enableNode_int(1);  - ERROR: 
> invalid input syntax for type timestamp: "Fri Jan 21 08:10:14.052379 
> 2005 SGT"
> CONTEXT:  PL/pgSQL function "enablenode_int" line 32 at SQL statement
>
> I have manually run the above two sql in the _slony_example schema, 
> both returning 1. So I'm not sure where the source of the error 
> originates from. The date/time stamp appears a little peculiar. ("Fri 
> Jan 21 08:10:14.052379
> 2005 SGT").
>
> I have attached the master schema, hope this helps.

The problem evidently is that the timezone you're using in your environment
is one that PostgreSQL does not recognize.

We use GMT/UTC exclusively throughout our environments so that it is NEVER
ambiguous what time it is.  Note that GMT/UTC does not vary due to Daylight
Savings Time and such.

You can check what the time zone is, I suppose, by typing in the command
"date", which should list a verbose timestamp.

SGT sounds like Singapore time, which is a bit unusual.

You can switch timezones for a particular process by setting the environment
variable TZ.

Thus, either

export TZ=UTC
or
setenv TZ UTC
(depending on whether or not you consider csh programming to be harmful...)

If you at least change TZ to something that PostgreSQL has in its default
time zone database that ought to suffice.

But "best practices" involve using UTC.  (I should probably throw that into
the FAQ or somewhere nearby the NTP sync discussion...)


______________________________________________________________________
This email, including attachments, is intended only for the addressee
and may be confidential, privileged and subject to copyright.  If you
have received this email in error, please advise the sender and delete
it.  If you are not the intended recipient of this email, you must not
use, copy or disclose its content to anyone.  You must not copy or 
communicate to others content that is confidential or subject to 
copyright, unless you have the consent of the content owner.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gborg.postgresql.org/pipermail/slony1-general/attachments/20050123/1e8e08a5/attachment.html


More information about the Slony1-general mailing list