We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi there,
using postgresql-11-periods/focal-pgdg,now 1.2-1.pgdg20.04+2 amd64
I've defined a table with system versioning as follow:
create table test1 ( id serial primary key, status varchar (30) default 'on' ); select periods.add_system_time_period ('test1', 'row_start', 'row_end'); select periods.add_system_versioning ('test1');
I've then add some rows to my table via:
insert into test1 (status) values ('on'); insert into test1 (status) values ('off'); insert into test1 (status) values ('on');
Now I'm trying to get my value at given date via test1__as_of ():
ls=# SELECT * FROM test1__as_of (now ()); id | status | row_start | row_end ----+--------+-------------------------------+---------- 1 | on | 2020-10-21 19:37:07.567824+02 | infinity 2 | off | 2020-10-21 19:52:33.665405+02 | infinity 3 | on | 2020-10-21 19:53:44.834846+02 | infinity (3 rows) ls=# SELECT * FROM test1__as_of ('2020-10-21 19:52:35.665405+02'); id | status | row_start | row_end ----+--------+-------------------------------+---------- 1 | on | 2020-10-21 19:37:07.567824+02 | infinity 2 | off | 2020-10-21 19:52:33.665405+02 | infinity (2 rows) ls=# SELECT * FROM test1__as_of ('2020-10-21 19:40:07.567824+02'); id | status | row_start | row_end ----+--------+-------------------------------+---------- 1 | on | 2020-10-21 19:37:07.567824+02 | infinity (1 row)
The question is: why I'm gotting all the records instead of a single one containing my status value at given date ? Am I missing something ?
Best.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi there,
using postgresql-11-periods/focal-pgdg,now 1.2-1.pgdg20.04+2 amd64
I've defined a table with system versioning as follow:
I've then add some rows to my table via:
Now I'm trying to get my value at given date via test1__as_of ():
The question is: why I'm gotting all the records instead of a single one containing my status value at given date ?
Am I missing something ?
Best.
The text was updated successfully, but these errors were encountered: