Skip to content

PostgreSQL: use JSONB for extra column #2597

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

Merged
merged 2 commits into from
Apr 28, 2025
Merged

PostgreSQL: use JSONB for extra column #2597

merged 2 commits into from
Apr 28, 2025

Conversation

sebix
Copy link
Member

@sebix sebix commented Apr 11, 2025

Postgres supports it since version 9, IntelMQ should have defaulted to it since then

@@ -213,8 +213,8 @@ def main():
help="Path to the harmonization file")
parser.add_argument("--skip-or-replace", default=False, action="store_true",
help="Add IF NOT EXISTS or REPLACE directive to created schemas")
parser.add_argument("--jsonb", default=False, action="store_true",
help="Use JSONB type to represent dictionary fields")
parser.add_argument("--no-jsonb", default=True, action="store_true",
Copy link
Member Author

Choose a reason for hiding this comment

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

Found by @th-certbund: default should be False

@sebix sebix changed the title psql_initdb: use JSONB by default PostgreSQL: use JSONB for extra column Apr 22, 2025
@sebix
Copy link
Member Author

sebix commented Apr 22, 2025

Also added an ALTER TABLE statement to the NEWS file.

Merging blocked by #2602

wagner-intevation added a commit to Intevation/intelmq-mailgen that referenced this pull request Apr 24, 2025
IntelMQ's eventdb events.extra switched from type JSON to JSONB:
certtools/intelmq#2597

directly use the JSONB type in the functions
sebix added 2 commits April 28, 2025 10:34
Postgres supports it since version 9, IntelMQ should have defaulted to
it since then
@sebix sebix merged commit 775684e into certtools:develop Apr 28, 2025
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants