Metadata-Version: 2.1
Name: pgxsq
Version: 0.1.0
Summary: Write Postgres extensions as Sqitch projects.
Author-email: Erik Wienhold <ewie@ewie.name>
License: BSD 3-Clause License
        
        Copyright 2023, Erik Wienhold
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this
           list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its
           contributors may be used to endorse or promote products derived from
           this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: Repository, https://gitlab.com/ewie/pgxsq
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Build Tools
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

# pgxsq

pgxsq simplifies writing [Postgres extensions] \(especially those relying on
[procedural languages]) by managing changes with [Sqitch].

Tracking changes in Postgres extensions is not easy.  Updating procedures or
views requires copying the defintion and make the necessary changes.  This has
a major drawback: the changes made are not obvious without resorting to `diff`.
Wouldn't it be great to track changes in version control and use, for example,
just `git diff` to see what changes were made?

pgxsq allows that by tracking changes with [Sqitch] and generating extension
scripts from those changes.  Changes are made by [reworking][sqitch-rework]
the scripts that define the extension objects.  Sqitch caries out the grunt
work of tracking the original script version so that the script can be modified
and tracked in version control.  pgxsq builds the extension update paths from
the Sqitch [tags][sqitch-tag] that are required for reworking.


## Example

This repository contains an [example](example) that shows the steps from
creating the Sqitch project to making changes to installing the extension.


## Installation

Install with `pip`:

    pip install pgxsq

Install from source:

    make install

You also need to [install][sqitch-download] Sqitch to create projects and use
pgxsq.


## Development

    make


[Postgres extensions]: https://www.postgresql.org/docs/current/extend-extensions.html
[procedural languages]: https://www.postgresql.org/docs/current/xplang.html
[Sqitch]: https://sqitch.org
[sqitch-download]: https://sqitch.org/download/
[sqitch-rework]: https://sqitch.org/docs/manual/sqitch-rework/
[sqitch-tag]: https://sqitch.org/docs/manual/sqitch-rework/
