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

Publication creation doesn't support specifying columns for published table #609

Closed
kacperk opened this issue Oct 26, 2023 · 1 comment · Fixed by #763
Closed

Publication creation doesn't support specifying columns for published table #609

kacperk opened this issue Oct 26, 2023 · 1 comment · Fixed by #763
Labels
help wanted Extra attention is needed

Comments

@kacperk
Copy link
Contributor

kacperk commented Oct 26, 2023

SUMMARY

Publication creation doesn't support specifying columns for which publication should be created -
example SQL - CREATE PUBLICATION users_filtered FOR TABLE users (user_id, firstname)

Right now if I pass as a table name users (user_id, firstname) it will quote the whole thing, which ends up as invalid SQL

ISSUE TYPE
  • Missing functionality
COMPONENT NAME

community.postgresql.postgresql_publication

ADDITIONAL INFORMATION

It should allow to set-up publication with a limited column set - since it is possible in Postgres >= 15

Specs could look like this:

tables:
  - "public"."users" (user_id, firstname)

or

tables:
  - users:
    - user_id
    - firstname
@Andersson007
Copy link
Collaborator

@kacperk hello, thanks for reporting the issue!
I'll put the help_wanted label + a link to our quick-start guide if anyone is interested to pick it.

@Andersson007 Andersson007 added the help wanted Extra attention is needed label Oct 30, 2023
Andersson007 added a commit that referenced this issue Nov 11, 2024
* Add initial code for creating publication with specified columns

* Add integration test

* Refactor and fix publication with columns

* Add more test for publication with columns

* Code clean-up

* Add changelog fragment

* Ensure that test assertion for publication with columns are run on postgres 15 or newer

* Update changelogs fragment

Co-authored-by: Andrew Klychkov <[email protected]>

* Add missing check for postgresql version

---------

Co-authored-by: Andrew Klychkov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants