I have this .sq, which looks like it should compil...
# squarelibraries
b
I have this .sq, which looks like it should compile to me.
Copy code
CREATE TABLE SchemaVersion (
    id INT PRIMARY KEY NOT NULL,
    version INT NOT NULL
);

setVersion:
INSERT INTO SchemaVersion(id, version) VALUES (0, ?)
ON CONFLICT (id) DO UPDATE SET version = excluded.version;
Instead, I get
Copy code
line 8:0 - ',' or RETURNING expected, got 'ON'
7    INSERT INTO SchemaVersion(id, version) VALUES (0, 'test')
8    ON CONFLICT (id) DO UPDATE SET version = excluded.version
I tried adding a RETURNING, which I don't really want, and that didn't do anything. Is this a bug? Or is there a misspelling somewhere I just can't see?
FWIW, this is the newer postgresql dialect
j
Postgres has lots of missing holes. File a bug on sql-psi
b
Okay figured. I'll file thanks
👍 1