examples-go
examples-go copied to clipboard
Use standard SQL syntax where possible
CockroachDB supports some SQL extensions that are not present in PostgreSQL. Where possible, example apps should be written to use standard SQL, or at least the common subset of CockroachDB and PostgreSQL. For example, this create table statement is incompatible with PostgreSQL because it names the index and includes the INDEX token. Changing it to UNIQUE (userID, timestamp) would allow this example to run on both databases.