Skip to content

matdehaast/pg_tigerbeetle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Extension

Development

  1. Start development shell
$ nix develop
  1. Relocate the postgres installation into our development environment and create a database.
$ pglocal && pginit
  1. Start the local postgres development server
$ pgstart
  1. Before you can build the extension you must edit the build.zig.zon file and update the hash value. To do so we run zig build and copy the hash value from the error message into the build.zig.zon file:
$ zig build

Fetch Packages... pgzx... build.zig.zon:13:20: error: url field is missing corresponding hash field
            .url = "https://github.com/xataio/pgzx/archive/main.tar.gz",
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: expected .hash = "122097e7141a57b8170ca5288f5514b2b5b27b730a78d2aae7a5f54675ae1614c690",
  1. Compile and install the extension into the development server
$ zig build -freference-trace -p $PG_HOME
...

$ psql -U postgres -c 'CREATE EXTENSION my_extension'
  1. Verify extension is working
$ psql -U postgres -c 'SELECT hello()'
  1. Stop development server
$ pgstop

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published