dolthub / dolthub/doltgresql

Duplicated %type declarations in postgres/parser/parser/sql.y

Open
#1,592 5 comments 0 reactions 0 assignees View on GitHub
customer issue
Dominant language
Go
Stars
2.1k
Forks
73
Avg merge
1d 11h
Merged PRs (30d)
152

Description

When I try to run bison-3.8.2 on postgres/parser/parser/sql.y I'm getting this:
```
bison doltgresql.y
doltgresql.y:1126.27-39: error: %type redeclaration for opt_icu_rules
1126 | %type opt_icu_rules opt_icu_rules opt_locale_provider opt_colla...
| ^~~~~~~~~~~~~
doltgresql.y:1126.13-25: note: previous declaration
1126 | %type opt_icu_rules opt_icu_rules opt_locale_provider opt_colla...
| ^~~~~~~~~~~~~
doltgresql.y:1291.20-32: error: %type redeclaration for rowsfrom_list
1291 | %type rowsfrom_list
| ^~~~~~~~~~~~~
doltgresql.y:1207.35-47: note: previous declaration
1207 | %type from_list rowsfrom_list opt_from_list
| ^~~~~~~~~~~~~
```

Contributor guide

Open the contributing guide

Research direction

Open postgres/parser/parser/sql.y and inspect the %type declarations around lines 1126, 1207, and 1291. Run bison 3.8.2 against the grammar first, then verify that the duplicate-declaration errors for opt_icu_rules and rowsfrom_list are gone and the parser still generates successfully.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.