You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem Description:
I created schem with table and view, which sum data group by foreign key (primary key of table mentioned before). The problem is, that when I edit table, everythings updates, but if I edit table that the view is based ofn nothing updates. I found example with views in project. After adding base_tables I can see that the trigger has sent data but I have an error. I think the problem is I dont have id in view, but in this case I cant add id.
create view reservation_view(user_id, amount_reserved) as
SELECT reservation.user_id,
sum(reservation.amount) AS amount_reserved
FROM reservation
GROUP BY reservation.user_id;
Table reservation:
id uuid default uuid_generate_v4() not null
primary key,
user_id uuid not null,
amount integer not null,
Any ideas?
Error Message (if any):
2024-05-07 16:37:41.981:ERROR:pgsync.sync: Primary keys ['user_id'] not subset of payload data dict_keys(['id']) for table public.reservation_view
NoneType: None
The text was updated successfully, but these errors were encountered:
SkymaxPlay
changed the title
Support view without id
View without primary id
May 7, 2024
PGSync version: 3.1.0
Postgres version: 12
Elasticsearch/OpenSearch version: 8.13.2
Redis version: 7.2.4
Python version: 3.10
Problem Description:
I created schem with table and view, which sum data group by foreign key (primary key of table mentioned before). The problem is, that when I edit table, everythings updates, but if I edit table that the view is based ofn nothing updates. I found example with views in project. After adding
base_tables
I can see that the trigger has sent data but I have an error. I think the problem is I dont have id in view, but in this case I cant add id.Schem:
View:
Table reservation:
Any ideas?
Error Message (if any):
The text was updated successfully, but these errors were encountered: