dwyl / dwyl/learn-postgresql

Syntax Checking SQL Statements/Schema/Queries using pgsanity

Open
#57 2 comments 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
JavaScript
Stars
346
Forks
37
PR merge metrics
No merged PRs in 30d

Description

While trying to _hand_-write an SQL for _this_ tutorial, I had a cryptic error:
https://travis-ci.com/dwyl/learn-postgresql/builds/106420820#L508
![image](https://user-images.githubusercontent.com/194400/55276901-6e249d00-52f1-11e9-9f29-360460804791.png)

# `{ error: syntax error at or near "("`

In a file with 60 lines and **thirty** opening parentheses **`"("`**

![image](https://user-images.githubusercontent.com/194400/55276952-60bbe280-52f2-11e9-8bfd-a8fb58d2608c.png)

This error message is about as helpful as sunscreen on a submarine ...

So I went hunting for a syntax checker and found: https://github.com/markdrago/pgsanity

```
$ pgsanity schema.sql
line 24: ERROR: syntax error at or near "("
```
So at least I know what _line_ the error is on.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.