Search Postgresql Archives

Re: Postgres SQL Syntax

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Jim C." <jlistnews@xxxxxxxxx> writes:
> 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")
> );

That's not Postgres, and it's not SQL either ... it's a MySQL-ism.
Use a separate CREATE INDEX statement.

> Where can I find good examples of postgres syntax?

In the manual?
http://www.postgresql.org/docs/8.2/interactive/index.html
(adjust URL to match your PG version)

			regards, tom lane


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux