2

I'm trying to make an insert into postgres 8.4.13

insert into my_table (id, hour_memo) values (1,'17:30:00.000000 +01:00:00');

hour_memo is 'reltime datatype'

During the execution of the insert task i have this trouble:

ERROR:  invalid input syntax for type reltime: "17:30:00.000000 +01:00:00"

I have absolutely no idea on how to do this?

2
  • 1
    Why did you choose to use "reltime" datatype? Documentation says explicitly: The types abstime and reltime are lower precision types which are used internally. You are discouraged from using these types in applications; these internal types might disappear in a future release. Commented Feb 13, 2013 at 18:32
  • 1
    While @depesz comment is correct, that is not a reason to downvote the question (whoever did it) as it is useful exactly to highlight that that type should not be used. Commented Feb 13, 2013 at 18:36

1 Answer 1

2

The answer is that reltime doesn't support time zones, so the "+01..." thing is breaking it. Still - using reltime type is bad idea, and should be replaced by some normal type.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.