drawdb-io / drawdb-io/drawdb

PostgreSQL schema import that contains a multi-SELECT VIEW

Open
#432 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
39.5k
Forks
3.2k
Avg merge
10h 46m
Merged PRs (30d)
16

Description

Hi! Again, a very nieche problem. VIEWs, that look like this:

```sql
CREATE VIEW public.... AS
SELECT ...
FROM (...
JOIN ... ON ((... = ...)))
UNION
SELECT ...
FROM (...
JOIN ... ON ((... = ...)));
```

cannot be loaded, due to the second SELECT statement after the UNION. Again, removing this just works fine.

Contributor guide

Open the contributing guide

Research direction

Reproduce the problem by importing a PostgreSQL schema containing a VIEW with multiple SELECT statements joined by UNION. Locate the schema-import entry point and its existing import tests, then add coverage for this view shape. Done means the schema imports successfully without removing the second SELECT.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, postgresql, sql
Domain
databases
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.