Skip to content

Instantly share code, notes, and snippets.

@jawj
Created November 12, 2024 17:19
Show Gist options
  • Save jawj/6f47c7eaddef6af9ccdaeb86a5e43d25 to your computer and use it in GitHub Desktop.
Save jawj/6f47c7eaddef6af9ccdaeb86a5e43d25 to your computer and use it in GitHub Desktop.
Load pgconf PDFs in psql
\set contents `base64 < "path/to/pgconf.eu.2023/2023.pgconf.eu Zero Downtime PostgreSQL Upgrades.pdf"`
insert into docs (name, fulltext) values ($$2023.pgconf.eu Zero Downtime PostgreSQL Upgrades.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/20231215_PGConfEU_What-cant-pgBackRest-do-for-you.pdf"`
insert into docs (name, fulltext) values ($$20231215_PGConfEU_What-cant-pgBackRest-do-for-you.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/A journey into postgresql logical replication.pdf"`
insert into docs (name, fulltext) values ($$A journey into postgresql logical replication.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Breaking Up Massive Tables with Partitioning.pdf"`
insert into docs (name, fulltext) values ($$Breaking Up Massive Tables with Partitioning.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/COLLAB-So you want a PGDay in your City - V1.pdf"`
insert into docs (name, fulltext) values ($$COLLAB-So you want a PGDay in your City - V1.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Distributed PostgreSQL 2023.pdf"`
insert into docs (name, fulltext) values ($$Distributed PostgreSQL 2023.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Hamid Akhtar - PostgreSQL Write-Ahead Logging (WAL)_ The Internals of Reliability and Recovery.pdf"`
insert into docs (name, fulltext) values ($$Hamid Akhtar - PostgreSQL Write-Ahead Logging (WAL)_ The Internals of Reliability and Recovery.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Know the less known - A PostgreSQL Glossary - Devrim Gunduz - December 2023.pdf"`
insert into docs (name, fulltext) values ($$Know the less known - A PostgreSQL Glossary - Devrim Gunduz - December 2023.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Leveraging pgBadger for Effective PostgreSQL Troubleshooting-pgconfeu.pdf"`
insert into docs (name, fulltext) values ($$Leveraging pgBadger for Effective PostgreSQL Troubleshooting-pgconfeu.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Monitoring PostgreSQL made simple - pgconf.eu'23.pdf"`
insert into docs (name, fulltext) values ($$Monitoring PostgreSQL made simple - pgconf.eu'23.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Multi-threaded PostgreSQL .pdf"`
insert into docs (name, fulltext) values ($$Multi-threaded PostgreSQL .pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/P-DBI-E-20231214-PostgreSQL_security_with_demo.pdf"`
insert into docs (name, fulltext) values ($$P-DBI-E-20231214-PostgreSQL_security_with_demo.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/P-DBI-E-20231216-PGCONFEU-pg_stat_io.pdf"`
insert into docs (name, fulltext) values ($$P-DBI-E-20231216-PGCONFEU-pg_stat_io.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/PGConf EU - PostgreSQL for IoT.pdf"`
insert into docs (name, fulltext) values ($$PGConf EU - PostgreSQL for IoT.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/PGConf.EU 23 Pgpool - What, Why, Where.pdf"`
insert into docs (name, fulltext) values ($$PGConf.EU 23 Pgpool - What, Why, Where.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/PGConfEU 2023 - MQ on PG.pdf"`
insert into docs (name, fulltext) values ($$PGConfEU 2023 - MQ on PG.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/PGConfEU2023_PostgreSQL_Hacker_Tips.pdf"`
insert into docs (name, fulltext) values ($$PGConfEU2023_PostgreSQL_Hacker_Tips.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/PGconf.EU. 2023_Valeria's talk - Elephant in a nutshell.pdf"`
insert into docs (name, fulltext) values ($$PGconf.EU. 2023_Valeria's talk - Elephant in a nutshell.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Performance tips you have never seen before - V2 (1).pdf"`
insert into docs (name, fulltext) values ($$Performance tips you have never seen before - V2 (1).pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Postgres snapshot_pgconf_prague.pdf"`
insert into docs (name, fulltext) values ($$Postgres snapshot_pgconf_prague.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Right_avail_pgconfeu.pdf"`
insert into docs (name, fulltext) values ($$Right_avail_pgconfeu.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Tame the growth of your database.pdf"`
insert into docs (name, fulltext) values ($$Tame the growth of your database.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Understanding and Fixing Autovacuum - PGCONF.EU 2023.pdf"`
insert into docs (name, fulltext) values ($$Understanding and Fixing Autovacuum - PGCONF.EU 2023.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/Why using Open Source PostgreSQL matters (1).pdf"`
insert into docs (name, fulltext) values ($$Why using Open Source PostgreSQL matters (1).pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/ansible_to_shepherd_your_elephants.pdf"`
insert into docs (name, fulltext) values ($$ansible_to_shepherd_your_elephants.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/bmejias_should_I_use_json.pdf"`
insert into docs (name, fulltext) values ($$bmejias_should_I_use_json.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/community_panel_2023.pdf"`
insert into docs (name, fulltext) values ($$community_panel_2023.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/data_corruption.pdf"`
insert into docs (name, fulltext) values ($$data_corruption.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/pgconfeu2023_active_active.pdf"`
insert into docs (name, fulltext) values ($$pgconfeu2023_active_active.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/pgconfeu2023_logical_decoding_on_standby.pdf"`
insert into docs (name, fulltext) values ($$pgconfeu2023_logical_decoding_on_standby.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/pgconfeu2023_vectors.pdf"`
insert into docs (name, fulltext) values ($$pgconfeu2023_vectors.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/postGISPGRoutingPresentation.pdf"`
insert into docs (name, fulltext) values ($$postGISPGRoutingPresentation.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/postgres-vs-filesystems-pgconfeu-2023.pdf"`
insert into docs (name, fulltext) values ($$postgres-vs-filesystems-pgconfeu-2023.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/postgres_replication_pitfalls_and_solutions.pdf"`
insert into docs (name, fulltext) values ($$postgres_replication_pitfalls_and_solutions.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/roaring.pdf"`
insert into docs (name, fulltext) values ($$roaring.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
\set contents `base64 < "path/to/pgconf.eu.2023/supercharge_postgres_with_extensions.pdf"`
insert into docs (name, fulltext) values ($$supercharge_postgres_with_extensions.pdf$$, rag.text_from_pdf(decode(:'contents','base64')));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment