{"repo":"nearform/temporal_tables","free":true,"listed":false,"github":"https://github.com/nearform/temporal_tables","clone":"git clone https://github.com/nearform/temporal_tables.git","description":"Postgresql temporal_tables extension in PL/pgSQL, without the need for external c extension.","language":"PLpgSQL","stars":761,"topics":["postgresql","temporal"],"license":null,"category":"databases-storage","readme_excerpt":"Temporal Tables This rewrite aims to provide a temporal tables solution in PL/pgSQL, targeting AWS RDS, Google Cloud SQL, and Azure Database for PostgreSQL where custom C extensions aren't permitted. The script in versioning function.sql serves as a direct substitute. For a speedier but riskier option, versioning function nochecks.sql is 2x faster due to the absence of validation checks. Over time, new features have been introduced while maintaining backward compatibility: - Ignore updates with no actual changes - Include the current version in history - Autoincrementing version number support Usage Create a database and the versioning function: If you would like to have set system time function available (more details below) you should run the following as well: Connect to the db: Create the table to version, in this example it will be a \"subscription\" table: Add the system period column: Create the history table: To improve performance of the trigger at runtime, include some indexes on the history table: Finally, create the trigger: A note on the history table name. Previous versions of this extension quoted and escaped it before usage. Starting version 0.4.0 we are not escaping it anymore and users need to provide the escaped version as a parameter to the trigger. This is consistent with the C version, simplifies the extension code and fixes an issue with upper case names that weren't properly supported. Now test with some data: Take some time between a query and the follo","default_branch":null,"files":null,"tree":[],"storefront":"/r/nearform","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/nearform/temporal_tables/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}