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

🐛: Quote the history table name #25

Closed
wants to merge 2 commits into from

Conversation

afitzek
Copy link

@afitzek afitzek commented Sep 4, 2020

In case the history table identifier needs quoting the function fails, because the generated statement is not valid. This should fix the problem.

Change-type: patch
Signed-off-by: Andreas Fitzek andreas.fitzek@reactivereality.com

Change-type: patch
Signed-off-by: Andreas Fitzek <andreas.fitzek@reactivereality.com>
@mrrinot
Copy link

mrrinot commented Oct 22, 2020

I tested this and I had to add another quote_ident() around the history_table on this line

 WHERE  attrelid = history_table::regclass

Thanks to @mrrinot for pointing out missing places.

Change-type: patch
Signed-off-by: Andreas Fitzek <andreas.fitzek@reactivereality.com>
@afitzek
Copy link
Author

afitzek commented Nov 25, 2020

Thanks @mrrinot 👍
I also found a couple more places where this is needed and updated the PR. :)

@paolochiodi
Copy link
Member

Hi @afitzek and @mrrinot thank for your comments and sorry for my late reply.

This seems to undo the work done in #21 where we removed all quoting as suggested by @yktv4 in a previous PR (#17) and issue #16

To me it seems a clearer and simpler solution to just provide the table name already quoted as a parameter to the trigger.

Have you tried that solution in the implementation without quote_ident?
Did you have any issue with that?

I'd be happy to hear your thinking on that.

@afitzek
Copy link
Author

afitzek commented Dec 3, 2020

Hi @paolochiodi

First of all thank you for writing this library, it is very nice! :)

The solution to require the user to provide the correct quoted table name is also fine and I didn't think about the case where a user prefixes the table with the schema.

@simoneb
Copy link
Member

simoneb commented Sep 8, 2021

@afitzek can we close this without merging?

@afitzek
Copy link
Author

afitzek commented Sep 9, 2021

@simoneb Yes I think so, I forgot about this one.

@afitzek afitzek closed this Sep 9, 2021
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.

4 participants