appbaseio / appbaseio/abc

postgres materialized view support

Open
#103 2 comments 0 reactions 0 assignees View on GitHub
needs review
Dominant language
Go
Stars
471
Forks
47
PR merge metrics
No merged PRs in 30d

Description

Attempting to sync a database with a materialized view.

Expected result: rows in materialized view appear in index.
Actual result: document type does not appear in index.

Looks like [adaptor queries](https://github.com/appbaseio/abc/blob/2b659e2502a4c5788254924590a18bab38c5be47/adaptor/postgres/reader.go#L63) via
```
SELECT table_schema,table_name FROM information_schema.tables
```

Perhaps this is a viable alternative?
```
SELECT table_schema,table_name FROM information_schema.tables
UNION
SELECT schemaname, matviewname FROM pg_matviews
```

Version: 0.6.0
Variant: !oss
Go version: go1.10.1
OS: linux
Arch: amd64

##### Checks

- [x] I have mentioned my `abc` version in the issue, if applicable.
- [x] This issue is not a duplicate.
- [x] This issue has a description.

Contributor guide

Open the contributing guide

Research direction

Start in adaptor/postgres/reader.go around the information_schema.tables query mentioned in the issue, then reproduce a sync against a PostgreSQL materialized view. Verify that the materialized view's rows and document type appear in the resulting index, alongside the existing table behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, postgresql
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.