Re: Postgres SQL Syntax

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Postgres SQL Syntax
Дата
Msg-id 13761.1170382834@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Postgres SQL Syntax  ("Jim C." <jlistnews@gmail.com>)
Список pgsql-general
"Jim C." <jlistnews@gmail.com> 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

В списке pgsql-general по дате отправления:

Предыдущее
От: "Jim C."
Дата:
Сообщение: Postgres SQL Syntax
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: How to allow users to log on only from my application not from pgadmin