Posts
Upgrade from PostgreSQL 15 to 17 on Windows using pg_upgrade
#pg_upgrade#postgresql#windows 10#pg_dump#pg_dumpall
Overview At work I needed to upgrade from PostgreSQL from 15 to 17. The process is not that different than upgrading in Ubuntu but there were a couple of items that threw me off. Perform Backup This should be done prior to the update in case something goes wrong: CTyler@CTYLER_NB C:\Program Files\PostgreSQL\17\bin [08:22] ❯ & 'C:\Program Files\PostgreSQL\17\bin\pg_dumpall.exe' -p 5432 -U postgres -f D:\Backups\postgresql-ctyler_nb-20241107-1.out This was based on the documentation PostgreSQL: Documentation: 17: pg_dumpall.
November 10, 2024
Setup Apt-Mirror on Ubuntu
#apt-mirror#apache#ubuntu#python
Notes on how to setup apt-mirror with Ubuntu 24.04
September 13, 2024
Count Number of Lines in a Git Repository
If you were ever curious how many lines of code you have in a repo.
September 5, 2024
Get Your Work Recognized
#brag document#smart goals#career#performance review
Make sure that you document your work to get recognized at work.
August 27, 2024
Reboot using Hugo
#github#hugo#hextra theme#pelican
Migrating away from Pelican to Hugo.
August 24, 2024
Rebuild Pelican Source
#pelican#python#hugo#git#git submodules#pyenv#pelican-jupyter
More work than expected to get my development system to work with Pelican.
August 11, 2024
View Code of Stored Procedure
#til#ms sql server#ms sql server management studio#mssms
I needed to see the code of a stored procedure in MS SQL Server at work so that I could create a modified query. I normally don’t use Stack Overflow much anymore but this was actually useful and well described. Using SQL Server Management Studio do the following: Go to Database -> Programmmability -> Stored Procedure. Right click on the procedure you want to view and click Modify. Be careful not to modify it when you only want to view it.
November 28, 2023
How to List Active Connections on PostgreSQL
#til#pg_stat_activity#postgresql
How to check using a query what is actively running.
October 17, 2023
Check for Unvalidated Database Constraints
#til#postgresql#constraints#pg_constraint#mastodon
Verify that you don’t have a constraint created without validation.
October 10, 2023
Date, Time and Time Zones
#time#date#timezone#utc#the art of postgresql#sql#postgresql#time zone
The pain of dealing with dates and time.
October 4, 2023
How to Read a Vim Swapfile
How to read a swapfile, especially where there isn’t an reference file.
September 12, 2023
Get Battery Status in CLI
How to get the battery status using standard CLI tools in Linux.
September 12, 2023
Delete Files Older Than x Days on Linux
Quickly delete files older than a certain number of days.
September 5, 2023
How to Use a match case Statement
#til#python 3.10#match case#python
Some examples of how to use match case statement in Python.
August 29, 2023
Set Statement Timeout
#til#timeout#statement_timeout#postgresql#idle_in_transaction
Set a timeout in case you want to terminate a long running query.
August 1, 2023
Escape Keys using psycopg2
#til#psycopg2#python#postgresql
Making sure that using % in PostgreSQL works with psycopg2.
June 2, 2023
Setup Python Package to use with Pipx
#til#python#pipx#pyproject#flit
Setting up your Python project to work with pipx and pyproject.toml
May 26, 2023
Clear Highlighting in Vim
Clearing highlighting after performing a search for an example.
April 14, 2023
Inject Packages in pipx
#pipx#visidata#psycopg2-binary
Add packages to an existing virtual environment.
April 7, 2023
Application Name in PostgreSQL
#til#postgresql#application_name#taop#The Art of PostgreSQL
Send application name to PostgreSQL.
March 31, 2023
Find and Replace in Vim
#til#vim#find#replace#substitute
Different ways to find and replace items using vim.
March 24, 2023
Calculate the Distance between two Latitudes and Longitudes
#til#sql#SQL for Data Scientists
Calculation using SQL.
March 17, 2023
Get Disk Size for Each Database
#til#taop#postgresql#psql#The Art of PostgreSQL#pg_database
Get the disk size for each database in PostgreSQL.
March 10, 2023
Include Schema in psycopg2 Connection String
#til#postgresql#psycopg2#sqlalchemy
Include schema in PostgreSQL connection string.
December 19, 2022
Create Automatic Timestamps in PostgreSQL
#til#postgresql#timestamp#function
Create automatic timestamps by default.
December 16, 2022
Using Rich Inspect to Interrogate Python Objects
Using Rich can help format an object in the REPL.
November 13, 2022
Weather Project
Create a simple weather project to document how to add projects to PyPi and to aid with data analysis.
July 19, 2022
Reuven Lerner's Weekly Python Exercise A3
#training#Reuven Lerner#oop#python#review
Review of Reuven’s Weekly Python Exercise A3.
January 14, 2022
Reuven Lerner's Object-orient Python
#training#Reuven Lerner#oop#python#review
Review of Reuven’s OOP Python self pace course.
January 8, 2022