Skip to content
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

Server crashes when executing SELECT 10000000000000000000 % 1; #38

Open
Gudwlin opened this issue Jan 14, 2025 · 0 comments
Open

Server crashes when executing SELECT 10000000000000000000 % 1; #38

Gudwlin opened this issue Jan 14, 2025 · 0 comments

Comments

@Gudwlin
Copy link

Gudwlin commented Jan 14, 2025

Describe the bug
Server crashes when executing the following psql command

What data setup do we need to do?
BemiDB(main) with PostgreSQL (REL_17_STABLE).

What is the necessary configuration info needed?
My PostgreSQL configuration:

./configure

What is the command that caused the error?

psql postgres://localhost:54321/bemidb -c "SELECT 10000000000000000000 % 1;"

backtrace:

panic: Unsupported column type: HUGEINT

goroutine 11 [running]:
main.(*QueryHandler).columnTypeOid(0xc00005bc88?, 0xc0005ed770)
	/app/query_handler.go:478 +0x665
main.(*QueryHandler).generateRowDescription(0xc000658000, {0xc0001a5050, 0x1, 0xc00011b5c0?})
	/app/query_handler.go:391 +0xb7
main.(*QueryHandler).rowsToDescriptionMessages(0xc000658000, 0x2be3820?, {0xc00011b5c0, 0x1f})
	/app/query_handler.go:344 +0x51
main.(*QueryHandler).HandleQuery(0xc000658000, {0xc00011b5a0, 0x20})
	/app/query_handler.go:196 +0x332
main.(*Postgres).handleSimpleQuery(0xc0005d1c38, 0xc000658000, 0xc0000c4ce0)
	/app/postgres.go:95 +0xb6
main.(*Postgres).Run(0xc0005d1c38, 0xc000658000)
	/app/postgres.go:73 +0xd7
main.start.func1()
	/app/main.go:63 +0x45
created by main.start in goroutine 1
	/app/main.go:62 +0x1c5

Expected behavior
Expected ERROR to be shown or sql query to be successfully executed

Best regards,
Artyom Zarubin
Postgres Professional: https://postgrespro.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant