Skip to content

SQL syntax error from postgres PRIMARY KEY (...) INCLUDE (...) #592

Closed
@tv42

Description

@tv42
CREATE TABLE foo (
	PRIMARY KEY (a, b) INCLUDE (c),
	a integer,
	b integer,
	c integer
)
foo.sql:1:1: syntax error at or near "INCLUDE"

The optional INCLUDE clause allows a list of columns to be specified which will be included in the non-key portion of the index.

https://www.postgresql.org/docs/current/sql-createtable.html

It seems like sqlc could safely ignore anything inside those INCLUDE parens.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions