{"id":22792705,"url":"https://github.com/johnantoni/pg-notes","last_synced_at":"2026-07-29T22:31:56.078Z","repository":{"id":11643859,"uuid":"14148793","full_name":"johnantoni/pg-notes","owner":"johnantoni","description":"postgres notes","archived":false,"fork":false,"pushed_at":"2013-12-02T21:36:32.000Z","size":108,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-10T21:39:41.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnantoni.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-05T17:36:39.000Z","updated_at":"2014-08-18T19:45:15.000Z","dependencies_parsed_at":"2022-09-23T00:41:29.316Z","dependency_job_id":null,"html_url":"https://github.com/johnantoni/pg-notes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johnantoni/pg-notes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fpg-notes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fpg-notes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fpg-notes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fpg-notes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnantoni","download_url":"https://codeload.github.com/johnantoni/pg-notes/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnantoni%2Fpg-notes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36052204,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-29T02:00:04.910Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-12T03:15:50.894Z","updated_at":"2026-07-29T22:31:56.020Z","avatar_url":"https://github.com/johnantoni.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Postgres\n\n### Install\n\n#### json.pm (osx)\n\n    sudo cpan App::cpanminus\n    ...or\n    curl -L http://cpanmin.us | perl - _sudo App::cpanminus\n\n### Backup\n\nvia Linux\n\n    pg_dump -Fc --no-acl --no-owner -h localhost -U [username] mydb \u003e dump.sql\n\nvia OSX \u0026 http://postgresapp.com\n\n    /Applications/Postgres.app/Contents/MacOS/bin/pg_dump -Fc --no-acl --no-owner -h localhost -U [username] mydb \u003e dump.sql\n\n### Restore\n\n    pg_restore --verbose --clean --no-acl --no-owner -h localhost -U [username] -d mydb dump.sql\n    ...or\n    pg_restore --verbose --clean --no-acl --no-owner -h localhost -U [username] --port 5432 -d mydb dump.sql\n\nvia OSX \u0026 http://postgresapp.com/\n\n    /Applications/Postgres.app/Contents/MacOS/bin/pg_restore --verbose --clean --no-acl --no-owner -h localhost -U [username] -d mydb dump.sql\n\n### Login\n\nfor postgres.app\n\n    psql -h localhost\n    ...or\n    psql -h localhost --port 5432 -U postgres\n\n### Create user 'john'\n\n    psql -U postgres\n    createuser john;\n    alter user john with superuser;\n\n--- other\n\n    psql -l -U postgres\n    whoami\n    createuser john\n    createuser -U postgres john\n    psql template1 postgres\n\n### Permissions\n\n    CREATE USER tony WITH PASSWORD 'password';\n    ALTER USER tony WITH SUPERUSER;\n    CREATE DATABASE mark1;\n    GRANT ALL PRIVILEGES ON DATABASE mark1 to tony;\n    \\q\n\n### MacPorts start / stop\n\n    sudo port load postgresql93-server\n    sudo port unload postgresql93-server\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnantoni%2Fpg-notes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnantoni%2Fpg-notes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnantoni%2Fpg-notes/lists"}