{"id":43631,"library":"plump-store-postgres","title":"Plump Store Postgres","description":"Postgres adapter for the Plump ORM/activerecord-style datastore. Current stable version is 0.27.0, released on an as-needed cadence. It provides a PostgreSQL endpoint for Plump models, supporting queries, migrations, and transactions. Differentiators include tight integration with Plump's schema and migration system, TypeScript-first design with full type support, and a simple promise-based API. Not recommended for standalone use; requires the core `plump` package.","status":"active","version":"0.27.0","language":"javascript","source_language":"en","source_url":"https://github.com/plumpstack/plump-store-postgres","tags":["javascript","typescript","orm","datastore","activerecord"],"install":[{"cmd":"npm install plump-store-postgres","lang":"bash","label":"npm"},{"cmd":"yarn add plump-store-postgres","lang":"bash","label":"yarn"},{"cmd":"pnpm add plump-store-postgres","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core Plump ORM – this adapter is an add-on and requires plump to be installed.","package":"plump","optional":false},{"reason":"PostgreSQL client driver for Node.js.","package":"pg","optional":false}],"imports":[{"note":"Named export, not default. For CJS: const { PostgresStore } = require('plump-store-postgres')","wrong":"import PostgresStore from 'plump-store-postgres'","symbol":"PostgresStore","correct":"import { PostgresStore } from 'plump-store-postgres'"}],"quickstart":{"code":"import { PostgresStore } from 'plump-store-postgres';\nimport { Plump } from 'plump';\n\nconst store = new PostgresStore({\n  host: process.env.PGHOST ?? 'localhost',\n  port: parseInt(process.env.PGPORT ?? '5432'),\n  database: process.env.PGDATABASE ?? 'myapp',\n  user: process.env.PGUSER ?? 'postgres',\n  password: process.env.PGPASSWORD ?? ''\n});\n\nconst plump = new Plump({ store });\n\nasync function main() {\n  await plump.connect();\n  const user = await plump.one('users', { email: 'test@example.com' });\n  console.log(user);\n  await plump.disconnect();\n}\n\nmain().catch(console.error);\n","lang":"typescript","description":"Initializes a PostgresStore, plugs it into the main Plump instance, connects, runs a query, and disconnects."},"warnings":[{"fix":"Pin exact versions of both plump and plump-store-postgres in package.json.","message":"Requires Plump core 0.x – breaking changes may occur across minor versions before 1.0.","severity":"breaking","affected_versions":">=0.0 <1.0"},{"fix":"Use env vars or a secret manager for production; avoid hardcoding credentials.","message":"Configuration via environment variables is the recommended pattern; passing plain objects is not deprecated but less secure in some contexts.","severity":"deprecated","affected_versions":">=0.0"},{"fix":"Use an external pool or call connect() once and reuse the plump instance.","message":"The store does not pool connections by default – each connect() creates a new client.","severity":"gotcha","affected_versions":">=0.0"}],"env_vars":null,"search_vec":"'0.27.0':15 'activerecord':76 'adapt':5 'api':61 'as-need':19 'base':60 'cadenc':22 'core':69 'current':11 'datastor':10,75 'design':50 'differenti':36 'endpoint':27 'first':49 'full':52 'includ':37 'integr':39 'javascript':72 'migrat':33,45 'model':30 'need':21 'orm':74 'orm/activerecord-style':9 'packag':71 'plump':1,8,29,41,70 'postgr':3,4 'postgresql':26 'promis':59 'promise-bas':58 'provid':24 'queri':32 'recommend':63 'releas':16 'requir':67 'schema':43 'simpl':57 'stabl':12 'standalon':65 'store':2 'support':31,54 'system':46 'tight':38 'transact':35 'type':53 'typescript':48,73 'typescript-first':47 'use':66 'version':13","created_at":"2026-06-05T17:00:43.629007+00:00","updated_at":"2026-06-05T17:00:43.629007+00:00","problems":[{"fix":"Run: npm install pg","cause":"pg is a peer dependency not auto-installed.","error":"Error: Cannot find module 'pg'"},{"fix":"Upgrade plump to at least 0.20.0.","cause":"Using an older version of Plump core that does not include the 'one' method.","error":"TypeError: plump.one is not a function"},{"fix":"Run plump migration commands before querying: await plump.migrate() or use plump CLI.","cause":"Migrations not run or table not created.","error":"Error: relation \"users\" does not exist"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/plumpstack/plump-store-postgres#readme","github":"https://github.com/plumpstack/plump-store-postgres","docs":null,"changelog":null,"pypi":null,"npm":"plump-store-postgres","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-05","next_check":"2026-09-03","install_tag":null}}