Dump/Restore of cvs regression database gives invalid timestamp syntax error

Started by Kris Jurkaalmost 22 years ago7 messagesbugs
Jump to latest
#1Kris Jurka
books@ejurka.com

Dumping and restoring the regression database in cvs tip gives the
following error upon restore:

ERROR: invalid input syntax for type timestamp with time zone:
"0097-02-16 17:32:01 BC-08"
CONTEXT: COPY timestamptz_tbl, line 42, column d1: "0097-02-16 17:32:01
BC-08"

Kris Jurka

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Kris Jurka (#1)
Re: Dump/Restore of cvs regression database gives invalid timestamp syntax error

Kris Jurka <books@ejurka.com> writes:

ERROR: invalid input syntax for type timestamp with time zone:
"0097-02-16 17:32:01 BC-08"

Thanks for catching this. It never came up before because we never
would try to output timezone info for a BC date...

We could make it output either of
0097-02-16 17:32:01 BC -08
0097-02-16 17:32:01-08 BC
as the input parser will take either. I'm kinda leaning to the latter;
any contrary opinions?

regards, tom lane

#3Alvaro Herrera
alvherre@dcc.uchile.cl
In reply to: Tom Lane (#2)
Re: Dump/Restore of cvs regression database gives invalid timestamp syntax error

On Thu, Jun 24, 2004 at 11:38:59AM -0400, Tom Lane wrote:

Kris Jurka <books@ejurka.com> writes:

ERROR: invalid input syntax for type timestamp with time zone:
"0097-02-16 17:32:01 BC-08"

Thanks for catching this. It never came up before because we never
would try to output timezone info for a BC date...

Maybe it's a good idea to routinely test regression dump/restore/dump
(and compare both dumps). This could also mean trying to keep the most
objects in it so features tested for regression are also tested for
recoverability ...

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El n�mero de instalaciones de UNIX se ha elevado a 10,
y se espera que este n�mero aumente" (UPM, 1972)

#4Bruce Momjian
bruce@momjian.us
In reply to: Tom Lane (#2)
Re: Dump/Restore of cvs regression database gives invalid timestamp

I assume this is not fixed yet, right?

---------------------------------------------------------------------------

Tom Lane wrote:

Kris Jurka <books@ejurka.com> writes:

ERROR: invalid input syntax for type timestamp with time zone:
"0097-02-16 17:32:01 BC-08"

Thanks for catching this. It never came up before because we never
would try to output timezone info for a BC date...

We could make it output either of
0097-02-16 17:32:01 BC -08
0097-02-16 17:32:01-08 BC
as the input parser will take either. I'm kinda leaning to the latter;
any contrary opinions?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#5Tom Lane
tgl@sss.pgh.pa.us
In reply to: Bruce Momjian (#4)
Re: Dump/Restore of cvs regression database gives invalid timestamp

Bruce Momjian <pgman@candle.pha.pa.us> writes:

I assume this is not fixed yet, right?

It is not fixed, but given the lack of objections I'll go ahead and fix
it as I proposed.

regards, tom lane

Show quoted text

---------------------------------------------------------------------------

Tom Lane wrote:

Kris Jurka <books@ejurka.com> writes:

ERROR: invalid input syntax for type timestamp with time zone:
"0097-02-16 17:32:01 BC-08"

Thanks for catching this. It never came up before because we never
would try to output timezone info for a BC date...

We could make it output either of
0097-02-16 17:32:01 BC -08
0097-02-16 17:32:01-08 BC
as the input parser will take either. I'm kinda leaning to the latter;
any contrary opinions?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
Bruce Momjian                        |  http://candle.pha.pa.us
pgman@candle.pha.pa.us               |  (610) 359-1001
+  If your life is a hard drive,     |  13 Roberts Road
+  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

#6Bruce Momjian
bruce@momjian.us
In reply to: Alvaro Herrera (#3)
Re: Dump/Restore of cvs regression database gives invalid timestamp

Tom just fixed this in CVS.

---------------------------------------------------------------------------

Alvaro Herrera wrote:

On Thu, Jun 24, 2004 at 11:38:59AM -0400, Tom Lane wrote:

Kris Jurka <books@ejurka.com> writes:

ERROR: invalid input syntax for type timestamp with time zone:
"0097-02-16 17:32:01 BC-08"

Thanks for catching this. It never came up before because we never
would try to output timezone info for a BC date...

Maybe it's a good idea to routinely test regression dump/restore/dump
(and compare both dumps). This could also mean trying to keep the most
objects in it so features tested for regression are also tested for
recoverability ...

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"El n?mero de instalaciones de UNIX se ha elevado a 10,
y se espera que este n?mero aumente" (UPM, 1972)

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#7Alvaro Herrera
alvherre@dcc.uchile.cl
In reply to: Bruce Momjian (#6)
Re: Dump/Restore of cvs regression database gives invalid timestamp syntax error

On Sun, Jul 11, 2004 at 09:02:06AM -0400, Bruce Momjian wrote:

Tom just fixed this in CVS.

This particular problem, yes, but maybe we want to detect early this
sort of problems in the future. That's why I think a dump/restore/dump
and compare both dumps could be a good test.

Alvaro Herrera wrote:

On Thu, Jun 24, 2004 at 11:38:59AM -0400, Tom Lane wrote:

Kris Jurka <books@ejurka.com> writes:

ERROR: invalid input syntax for type timestamp with time zone:
"0097-02-16 17:32:01 BC-08"

Thanks for catching this. It never came up before because we never
would try to output timezone info for a BC date...

Maybe it's a good idea to routinely test regression dump/restore/dump
(and compare both dumps). This could also mean trying to keep the most
objects in it so features tested for regression are also tested for
recoverability ...

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"La soledad es compa��a"