pgclimb icon indicating copy to clipboard operation
pgclimb copied to clipboard

Pglclimb crashes when running sql file

Open greenjaed opened this issue 8 years ago • 0 comments
trafficstars

When I try to run a particular sql script and output the results to csv, I get the following error:

panic: runtime error: slice bounds out of range [recovered]
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/lib/pq.(*conn).errRecover(0xc082068280, 0xc082058f90)
		/gopath/src/github.com/lib/pq/error.go:482 +0x198
github.com/lib/pq.expect(0xc0820028a0, 0xd, 0x7cadf0, 0x1, 0xd)
		/gopath/src/github.com/lib/pq/encode.go:199 +0x263
github.com/lib/pq.parseTs(0x0, 0xc0820028a0, 0xd, 0x0, 0x0)
		/gopath/src/github.com/lib/pq/encode.go:323 +0x4e8
github.com/lib/pq.textDecode(0xc0820684a8, 0xc0820682da, 0xd, 0x1c6, 0xc00000043a, 0x0, 0x0)
		/gopath/src/github.com/lib/pq/encode.go:91 +0x559
github.com/lib/pq.decode(0xc0820684a8, 0xc0820682da, 0xd, 0x1c6, 0x43a, 0x0, 0x0, 0x0)
		/gopath/src/github.com/lib/pq/encode.go:62 +0xa7
github.com/lib/pq.(*rows).Next(0xc082010070, 0xc082060160, 0x15, 0x15, 0x0, 0x0)

		/gopath/src/github.com/lib/pq/conn.go:1457 +0x4d9
database/sql.(*Rows).Next(0xc08202a360, 0xc082060000)
		/goroot/src/database/sql/sql.go:1592 +0x135
github.com/lukasmartinelli/pgclimb/formats.Export(0xc08209c000, 0x9bc, 0xc082096080, 0x78, 0x1c2090, 0xc0820624e0, 0x0, 0x0)
		/gopath/src/github.com/lukasmartinelli/pgclimb/formats/export.go:35 +0x258
main.exportFormat(0xc082064280, 0x1c2090, 0xc0820624e0)
		/usr/src/pgclimb/pgclimb.go:45 +0xcd
main.func┬╖004(0xc082064280)
		/usr/src/pgclimb/pgclimb.go:190 +0x11a
github.com/codegangsta/cli.Command.Run(0x7d5130, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x7e6350, 0xa, 0x0, ...)
		/gopath/src/github.com/codegangsta/cli/command.go:174 +0x140a
github.com/codegangsta/cli.(*App).Run(0xc082064000, 0xc08202c000, 0xe, 0xe, 0x0, 0x0)
		/gopath/src/github.com/codegangsta/cli/app.go:187 +0x1228
main.main()
		/usr/src/pgclimb/pgclimb.go:240 +0xe0c

goroutine 5 [runnable]:
database/sql.(*DB).connectionOpener(0xc0820940a0)
		/goroot/src/database/sql/sql.go:589 +0x53
created by database/sql.Open
		/goroot/src/database/sql/sql.go:452 +0x323

I'm not sure what particular information you require in order to make sense of this error, but for starters I was running pgclimb_windows_amd64 on a Postgres 9.4 database.

This is the query I was trying to run: query what causes the crash.txt

greenjaed avatar Aug 22 '17 16:08 greenjaed