Re: WIP: System Versioned Temporal Table

From: Vik Fearing <vik(at)postgresfriends(dot)org>
To: Simon Riggs <simon(dot)riggs(at)enterprisedb(dot)com>, Surafel Temesgen <surafel3000(at)gmail(dot)com>
Cc: Ryan Lambert <ryan(at)rustprooflabs(dot)com>, Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>, Michael Paquier <michael(at)paquier(dot)xyz>, Rémi Lapeyre <remi(dot)lapeyre(at)lenstra(dot)fr>, Eli Marmor <eli(at)netmask(dot)it>, David Steele <david(at)pgmasters(dot)net>, Vik Fearing <vik(dot)fearing(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Georgios <gkokolatos(at)protonmail(dot)com>
Subject: Re: WIP: System Versioned Temporal Table
Date: 2021-01-16 14:03:49
Message-ID: 2bd64392-b86c-9c08-f61e-cf04424a7341@postgresfriends.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/14/21 10:22 PM, Simon Riggs wrote:
> On Thu, Jan 14, 2021 at 5:46 PM Surafel Temesgen <surafel3000(at)gmail(dot)com> wrote:
>
>> On Fri, Jan 8, 2021 at 7:50 PM Ryan Lambert <ryan(at)rustprooflabs(dot)com> wrote:
>>>
>>> I prefer to have them hidden by default. This was mentioned up-thread with no decision, it seems the standard is ambiguous. MS SQL appears to have flip-flopped on this decision [1].
>
> I think the default should be like this:
>
> SELECT * FROM foo FOR SYSTEM_TIME AS OF ...
> should NOT include the Start and End timestamp columns
> because this acts like a normal query just with a different snapshot timestamp
>
> SELECT * FROM foo FOR SYSTEM_TIME BETWEEN x AND y
> SHOULD include the Start and End timestamp columns
> since this form of query can include multiple row versions for the
> same row, so it makes sense to see the validity times

I don't read the standard as being ambiguous about this at all. The
columns should be shown just like any other column of the table.

I am not opposed to being able to set an attribute on columns allowing
them to be excluded from "*" but that is irrelevant to this patch.
--
Vik Fearing

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Vik Fearing 2021-01-16 14:08:48 Re: WIP: System Versioned Temporal Table
Previous Message Vik Fearing 2021-01-16 13:21:03 Re: LET clause