A Common Lisp library for interacting with PostgreSQL databases, embracing PostgreSQL-specific features.
Postmodern is a Common Lisp library for interacting with PostgreSQL databases. It provides a high-level programming interface that leverages PostgreSQL's unique features, such as its wire protocol and data types, to offer a seamless and efficient database interaction experience for Lisp developers. The library includes components for low-level communication, an S-expression-based SQL syntax (S-SQL), and simple database-access objects (DAOs).
Common Lisp developers who need to work with PostgreSQL databases and want a library that embraces PostgreSQL-specific features rather than aiming for cross-database portability. It is suitable for projects ranging from simple scripts to threaded applications requiring connection pooling.
Developers choose Postmodern over alternatives like CLSQL or cl-dbi because it fully embraces PostgreSQL's non-standard features, providing a more natural and efficient Lisp interface. Its unique selling points include direct communication with the PostgreSQL server without foreign libraries, a Lispy SQL syntax (S-SQL) for mixing SQL and Lisp code with automatic escaping, and a focus on PostgreSQL-specific capabilities.
A Common Lisp PostgreSQL programming interface
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Communicates directly with the PostgreSQL server via its wire protocol without foreign libraries, ensuring efficient and low-overhead database interactions, as highlighted in the features.
Provides S-SQL, an S-expression-based syntax for writing SQL queries in a Lisp-like style with automatic escaping of values, simplifying query construction and enhancing safety.
Handles a wide range of PostgreSQL-specific data types, including arrays, JSON, and intervals, with optional integrations for date and time libraries like simple-date or local-time.
Supports connection pooling for threaded applications or high-connection scenarios, detailed in the quickstart guide, making it suitable for scalable systems.
The database-access objects (DAOs) are simple and lack advanced ORM features such as relationships or lazy loading, requiring manual coding for complex mappings, as admitted in the documentation.
Proper support for PostgreSQL time and timezone types necessitates loading and configuring external libraries like simple-date or local-time, adding setup steps and potential compatibility issues.
Some Common Lisp implementations, like ABCL, have broken DAO class inheritance, and Clisp has issues with execute-file, limiting the library's usability across all platforms, as noted in the portability section.