Postgres SQL Syntax

From: "Jim C(dot)" <jlistnews(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Postgres SQL Syntax
Date: 2007-02-02 01:02:50
Message-ID: epu2jq$vl8$1@sea.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I've a postgres statement that reads:

CREATE TABLE "channel" (
"chanid" int NOT NULL default '0',
"channum" varchar(10) NOT NULL default '',
"freqid" varchar(10) default NULL,
"sourceid" int default NULL,
.
.
.
PRIMARY KEY ("chanid"),
KEY "channel_src" ("channum","sourceid")
);

Postgres is choking on the KEY statement at the end.

> ERROR: table "channel" does not exist
> ERROR: syntax error at or near "(" at character 886

What's the proper postgres syntax for a double key like this?

Where can I find good examples of postgres syntax?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message d 2007-02-02 01:03:43 Append text using Concat on an Update query
Previous Message Paul Lambert 2007-02-02 00:59:08 Re: How to allow users to log on only from my application not from pgadmin