Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,5 @@ go.work.sum
**/*.class

# No binary files
**/bin/**
**/bin/**
.vscode/
16 changes: 13 additions & 3 deletions postgresql/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
all: build test

build:
# Generate keyword definitions from PostgreSQL official source
generate-keywords:
@echo "Generating PostgreSQL keyword definitions from REL_18_STABLE..."
cd keyword-generator && go run main.go
@echo ""

# Build the parser (depends on keyword generation)
build: generate-keywords
Copy link

Copilot AI Nov 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Makefile creates a dependency where build always runs generate-keywords first. This means every build will fetch keywords from the PostgreSQL GitHub repository, which could:

  1. Cause build failures if GitHub is unavailable
  2. Slow down builds significantly due to network calls
  3. Make builds non-deterministic if PostgreSQL updates their keywords

Recommendation: Consider removing the dependency and only running generate-keywords explicitly when needed, or check if generated files exist before regenerating them.

Suggested change
build: generate-keywords
build:

Copilot uses AI. Check for mistakes.
@echo "Building PostgreSQL parser..."
antlr -Dlanguage=Go -package postgresql -visitor -o . PostgreSQLLexer.g4 PostgreSQLParser.g4

test:
go test -v -run TestPostgreSQLParser
test:
go test -v -run TestPostgreSQLParser

.PHONY: all build test generate-keywords
Loading