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

support origin param in aiven_extras.pg_create_subscription #54

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

kathia-barahona
Copy link
Contributor

PG16 started supporting origin parameter on CREATE SUBSCRIPTION. Such value can be any (default) or none

@kathia-barahona kathia-barahona requested a review from a team as a code owner June 12, 2024 08:37
@kathia-barahona kathia-barahona marked this pull request as draft June 12, 2024 09:13
@kathia-barahona kathia-barahona marked this pull request as draft June 12, 2024 09:13
@kathia-barahona kathia-barahona force-pushed the kathiabarahona/create_suscription_with_origin branch 4 times, most recently from 0e5a61c to 781a009 Compare June 12, 2024 14:44
@kathia-barahona kathia-barahona marked this pull request as ready for review June 12, 2024 14:44
arg_subscription_name, arg_connection_string, arg_publication_name, arg_slot_name, arg_copy_data::TEXT);

-- PG16 and later: Include the origin parameter only if it's 'none', as its default is any
IF pg_version >= 160000 AND arg_origin = 'none' THEN
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: it would be better to validate the argument, eg:

  • raise an error if PG < 16 and anything other than 'any' is passed
  • raise an error if arg_origin is not 'any' or 'none'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

@kathia-barahona kathia-barahona force-pushed the kathiabarahona/create_suscription_with_origin branch from 781a009 to cdf7d4c Compare June 13, 2024 07:47
@rdunklau rdunklau merged commit e120e4f into main Jun 18, 2024
12 of 14 checks passed
@rdunklau rdunklau deleted the kathiabarahona/create_suscription_with_origin branch June 18, 2024 11:23
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.

2 participants