Skip to content

Instantly share code, notes, and snippets.

@swateek
Last active August 17, 2026 06:58
Show Gist options
  • Select an option

  • Save swateek/bfe5663e0f9996874edf7d02fb67aae0 to your computer and use it in GitHub Desktop.

Select an option

Save swateek/bfe5663e0f9996874edf7d02fb67aae0 to your computer and use it in GitHub Desktop.
Working With Lakebase Postgres

Listing All Tables In Database

-- List all tables in the current database (all schemas)
SELECT schemaname, tablename
FROM pg_catalog.pg_tables
WHERE schemaname NOT IN ('pg_catalog', 'information_schema')
ORDER BY schemaname, tablename;

Updating JSON Column In Table

UPDATE client_details
SET details = jsonb_set(
    details, 
    '{security, totp}', 
    'true', 
    false
)
WHERE id = 4;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment