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

Patch for saving Table OID and Attribute Number #1117

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

calledit
Copy link

@calledit calledit commented Apr 9, 2023

When columns are renamed in sql queries, tracking the original table and column is not possible in the current implementation.

Example:

SELECT users.user_names AS username, posts.text AS post_text from users
LEFT INNER JOIN posts ON posts.user_id = users.id

In this query the original table will not be accessible, despite postgres acctually returning that information.

This patch adds two propertys to the fieldDesc struct and code to parse those fields from the postgres response.
Originally mentioned in #363

Copy link
Collaborator

@rafiss rafiss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the contribution. could you please add a test that confirms it works as expected?

rows.go Outdated Show resolved Hide resolved
rows.go Outdated Show resolved Hide resolved
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.

None yet

2 participants