-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: pq: invalid input syntax for type timestamp: "2021-11-02 00:00:04.130" #52
Comments
I have the same issue. I try with
And always fail. |
I have the same problem: $ timescaledb-parallel-copy \
--connection "host=localhost user=ts sslmode=disable" \
--db-name ts \
--table stocks_real_time \
--file ticks-sample.csv \
--workers 4 \
--truncate \
--verbose \
--log-batches
panic: ERROR: invalid input syntax for type timestamp with time zone: "time" (SQLSTATE 22007)
goroutine 23 [running]:
main.processBatches(0x0, 0x0)
/Users/skovola/Documents/timescale/timescaledb-parallel-copy/cmd/timescaledb-parallel-copy/main.go:261 +0x8b1
created by main.main
/Users/skovola/Documents/timescale/timescaledb-parallel-copy/cmd/timescaledb-parallel-copy/main.go:161 +0x570 Here's my data file, it's just the first few lines from the original file downloaded from https://docs.timescale.com/getting-started/latest/time-series-data/: $ cat ticks-sample.csv
time,symbol,price,day_volume
2023-08-02 23:59:59+00,KO,62,
2023-08-02 23:59:59+00,TSLA,255.44,
2023-08-02 23:59:59+00,DIS,86.41,
2023-08-02 23:59:59+00,KO,62,
2023-08-02 23:59:59+00,DIS,86.41,
2023-08-02 23:59:58+00,PYPL,67.95,
2023-08-02 23:59:58+00,AMD,109.79,
2023-08-02 23:59:58+00,BMY,61.84,
2023-08-02 23:59:57+00,DIS,86.38, The table is taken from the getting started, https://docs.timescale.com/getting-started/latest/tables-hypertables/: CREATE TABLE stocks_real_time (
time TIMESTAMPTZ NOT NULL,
symbol TEXT NOT NULL,
price DOUBLE PRECISION NULL,
day_volume INT NULL
); The I'm using an M1 MacBookPro, this is the version of $ timescaledb-parallel-copy -version
timescaledb-parallel-copy 0.4.1-dev (darwin amd64) My PostgreSQL version is 14.8 (Homebrew) and the TimescaleDB version is 2.11.1. |
Worked for me once I added the |
Hi,
I'm trying to copy values where the date format is like
2021-11-02 00:00:04.130
. The table is of typetimestamp(3)
. I tried inserting it manually and it worked. Any idea why it does not let me insert?The text was updated successfully, but these errors were encountered: