Re: AS OF queries
От
Peter Eisentraut
Тема
Re: AS OF queries
Дата
Msg-id
bb5b5dee-bdd3-06cd-c08a-6d3ee1551487@2ndquadrant.com
Ответ на
Re: AS OF queries (Konstantin Knizhnik)
Список
Дерево обсуждения
AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries Hannu Krosing <hkrosing@gmail.com>
Re: AS OF queries Laurenz Albe <laurenz.albe@cybertec.at>
Re: AS OF queries Tom Lane <tgl@sss.pgh.pa.us>
Re: AS OF queries Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: AS OF queries Tom Lane <tgl@sss.pgh.pa.us>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries David Fetter <david@fetter.org>
Re: AS OF queries Alvaro Hernandez <aht@ongres.com>
Re: AS OF queries Jeff Janes <jeff.janes@gmail.com>
Re: AS OF queries legrand legrand <legrand_legrand@hotmail.com>
Re: AS OF queries David Fetter <david@fetter.org>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Re: AS OF queries legrand legrand <legrand_legrand@hotmail.com>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries legrand legrand <legrand_legrand@hotmail.com>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries legrand legrand <legrand_legrand@hotmail.com>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries Peter van Hardenberg <pvh@pvh.ca>
Re: AS OF queries Pantelis Theodosiou <ypercube@gmail.com>
Re: AS OF queries Magnus Hagander <magnus@hagander.net>
Re: AS OF queries Craig Ringer <craig@2ndquadrant.com>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries Laurenz Albe <laurenz.albe@cybertec.at>
Re: AS OF queries David Fetter <david@fetter.org>
Re: AS OF queries Alvaro Hernandez <aht@ongres.com>
Re: AS OF queries Masahiko Sawada <sawada.mshk@gmail.com>
Re: AS OF queries Joe Wildish <joe-postgresql.org@elusive.cx>
Re: AS OF queries PostgreSQL - Hans-Jürgen Schönig<postgres@cybertec.at>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries Greg Stark <stark@mit.edu>
Re: AS OF queries Michael Paquier <michael.paquier@gmail.com>
Re: AS OF queries konstantin knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries Bruce Momjian <bruce@momjian.us>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries Bruce Momjian <bruce@momjian.us>
Re: AS OF queries Craig Ringer <craig@2ndquadrant.com>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
Re: AS OF queries Craig Ringer <craig@2ndquadrant.com>
Re: AS OF queries Konstantin Knizhnik <k.knizhnik@postgrespro.ru>
On 12/29/17 06:28, Konstantin Knizhnik wrote: >> Can there be apparent RI >> violations? > Right now AS OF is used only in selects, not in update statements. So I > do not understand how integrity constraints can be violated. I mean, if you join tables connected by a foreign key, you can expect a certain shape of result, for example at least one match per PK row. But if you select from each table "as of" a different timestamp, then that won't hold. That could also throw off any optimizations we might come up with in that area, such as cross-table statistics. Not saying it can't or shouldn't be done, but there might be some questions. >> What happens if no old data for the >> selected AS OF is available? > It will just return the version closest to the specified timestamp. That seems strange. Shouldn't that be an error? >> How does this interact with catalog >> changes, such as changes to row-level security settings? (Do we apply >> the current or the past settings?) > Catalog changes are not currently supported. > And I do not have good understanding how to support it if query involves > two different timeslice with different versions of the table. > Too much places in parser/optimizer have to be change to support such > "historical collisions". Right, it's probably very hard to do. But I think it somehow should be recognized that catalog changes took place between the selected timestamp(s) and now and an error or notice should be produced. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-hackers по дате отправления