You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The program stops execution without an error message when executin rows.scan which contains results with a null value.
I was able to work around by using coalesce in the sql statement.
To Reproduce*
I created a table with three columns
column_name | data_type | character_maximum_length
-------------+-------------------+--------------------------
user_id | integer |
first | character varying | 15
last | character varying | 25
sql:
select column_name, data_type, character_maximum_length from information_schema.columns where table_name = 'person';
when using pgx.Query to execute the same query, the execution stops when scanning the resulting rows:
If possible, please provide runnable example such as:
Describe the bug
The program stops execution without an error message when executin rows.scan which contains results with a null value.
I was able to work around by using coalesce in the sql statement.
To Reproduce*
I created a table with three columns
column_name | data_type | character_maximum_length
-------------+-------------------+--------------------------
user_id | integer |
first | character varying | 15
last | character varying | 25
sql:
select column_name, data_type, character_maximum_length from information_schema.columns where table_name = 'person';
when using pgx.Query to execute the same query, the execution stops when scanning the resulting rows:
If possible, please provide runnable example such as:
Please run your example with the race detector enabled. For example,
go run -race main.go
orgo test -race
.Expected behavior
I expected a code completion wiyht a nil for the DTyp. Alertnatively a return with an error message.
Actual behavior
The program ends in the middle of the code witout returning an error message.
Version
$ go version
-> [e.g. go version go1.18.3 darwin/amd64] 1.22.5$ psql --no-psqlrc --tuples-only -c 'select version()'
-> [e.g. PostgreSQL 14.4 on x86_64-apple-darwin21.5.0, compiled by Apple clang version 13.1.6 (clang-1316.0.21.2.5), 64-bit] postgres 16.04 ubuntu23.4$ grep 'github.com/jackc/pgx/v[0-9]' go.mod
-> [e.g. v4.16.1]v5.7.1
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: