Comments (6)
I'll just drop that here without comment. :)
https://www.postgresql.org/docs/6.3/c0503.htm
from periods.
That would be a really nice feature to have in core PostgreSQL. I don't see how this extension can do it without hindering more than helping. Also, what should happen if the view uses an AS OF
clause in its query? Should the AS OF
on the view override it, or somehow combine them, or what?
The standard does not allow system versioning on anything but regular persistent base tables.
If you have any workable ideas on how it could be done, I'll be happy to review your patch or write one myself.
from periods.
I was just looking for a way to define a point in time in a single place using which all temporal tables will be queried. Oracle's flashback technology provides some mechanism like this, IIRC (but I may well be wrong about this, since it is quite some time ago I worked with Oracle flashback). Then I stumbled across this SQL Server feature, which looks really nice and thought that this would be nice for PostgreSQL and I couldn't find a better place to report this than here.
I could of course try out how SQL Server behaves if it already has an AS OF
clause on some of the tables it selects from and report my results back here. But that on its own isn't very valuable, I guess...
from periods.
FWIW: I did perform the test now and there is an error reported when I execute the query if the view contains an AS OF
clause already: SQL Error [13590] [S0001]: Temporal FOR SYSTEM_TIME clause can only be set once per temporal table. 'example' has more than one temporal FOR SYSTEM_TIME clause.
from periods.
The Oracle feature I was referring to is the DBMS_FLASHBACK
PL/SQL package (see https://docs.oracle.com/cd/E11882_01/appdev.112/e41502/adfns_flashback.htm#ADFNS01009). It provides procedures like ENABLE_AT_TIME
.
from periods.
MariaDB also appears to allow querying views with the AS OF
clause: https://mariadb.com/kb/en/system-versioned-tables/#views-and-subqueries
Also it offers a system variable offering a feature equivalent to that of Oracle's stored procedure: https://mariadb.com/kb/en/system-versioned-tables/#views-and-subqueries
from periods.
Related Issues (20)
- Is this bi-temporal + scd approach correct ? HOT 3
- Capitalised role throws error on add_system_versioning HOT 7
- Usage of "_as_of ()"
- Add support for custom system time
- Support for Range types (e.g. tstzrange?)
- Allow history table to be partitioned
- Crash on PG14 HOT 2
- Can't adjust GRANTs after backup and restore
- How to migrate from temporal_tables?
- QUESTION: How to handle Schema changes?
- pg_dump -n periods cannot dump the tables ? HOT 5
- Why version 1.2 is not visible in my pg14 ? HOT 6
- Foreign key constraints allow inconsistent state?
- Installation error HOT 2
- error when inserting new record HOT 1
- Remove add_period from a table HOT 2
- relation "example2__for_portion_of_validity" does not exist
- PG16: acl tests failing HOT 1
- Clarify how to use pg_dump & pg_restore with periods HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from periods.