-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support system versioning for views #18
Comments
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 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. |
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 |
FWIW: I did perform the test now and there is an error reported when I execute the query if the view contains an |
The Oracle feature I was referring to is the |
MariaDB also appears to allow querying views with the 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 |
I'll just drop that here without comment. :) |
SQL Server supports querying views with the
AS OF
clause and SQL Server will transparently apply the clause to all temporal tables participating in the view definition's query. See https://docs.microsoft.com/en-us/sql/relational-databases/tables/querying-data-in-a-system-versioned-temporal-table?view=sql-server-ver15#using-views-with-as-of-sub-clause-in-temporal-queries for details.I don't know if this feature is defined by the SQL standard or not, but it looks very powerful indeed.
The text was updated successfully, but these errors were encountered: