Skip to content

Fix PostgreSQL array scanning error#2

Merged
Nechja merged 1 commit intomainfrom
fix-postgres-array-scan
Sep 6, 2025
Merged

Fix PostgreSQL array scanning error#2
Nechja merged 1 commit intomainfrom
fix-postgres-array-scan

Conversation

@Nechja
Copy link
Copy Markdown
Owner

@Nechja Nechja commented Sep 6, 2025

Fixes #1

This pull request makes minor improvements to the way PostgreSQL array data is handled when scanning database rows. The most notable change is the use of pq.Array to correctly scan array fields from the database.

Database handling improvements:

  • Updated the rows.Scan call in getIndexes to use pq.Array for scanning array fields, ensuring correct handling of PostgreSQL array types.
  • Changed the import of github.com/lib/pq from a blank import to a standard import, as its exported functionality (pq.Array) is now being used.

Tested with PostgreSQL dvdrental database

@Nechja Nechja merged commit 176838c into main Sep 6, 2025
7 checks passed
@Nechja Nechja deleted the fix-postgres-array-scan branch October 3, 2025 15:07
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

Successfully merging this pull request may close these issues.

PostgreSQL array scanning error in getIndexes method

1 participant