Search Postgresql Archives

Is it possible (postgresql/mysql)

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

 



Hello List,
PostgreSQL 8.0.1 (on Solaris 9)
There is a PERL program that a friend purchased which is used to create tables on a MySQL database, and of course ;) I want to run this on a PostgreSQL database server instead. The below is the code:
$sth=runSQL("CREATE TABLE someTable (
                   date_create bigint NOT NULL,
                   date_end bigint NOT NULL,
                   username VARCHAR(20) NOT NULL,
                   $cat_definition
                   id serial PRIMARY KEY,
                   status VARCHAR(20) NOT NULL,
                   $adfields
                  visibility TEXT NOT NULL,
                  priority TEXT NOT NULL,
                  template TEXT NOT NULL,
                  view bigint DEFAULT 0 NOT NULL,
                  reply bigint DEFAULT 0 NOT NULL,
                  save bigint DEFAULT 0 NOT NULL,
                  updated bigint,
                  photo VARCHAR(1) NOT NULL DEFAULT '0',
                  INDEX(username),
                  $cat_index
                  INDEX(date_create) );");

What my question is, the "INDEX(...)" function calls, which work this way on MySQL, don't work in PostgreSQL. Does anybody know what a synonymous way to modify the above code, for compatibility with PostgreSQL?

FYI:    yourVariable  INT UNSIGNED AUTO_INCREMENT(MySQL)
can be replaced by yourVariable serial

Thanks group!

--
Email:    louis.gonzales@xxxxxxxxxxxxxx
WebSite:  http://www.linuxlouis.net
"Open the pod bay doors HAL!" -2001: A Space Odyssey
"Good morning starshine, the Earth says hello." -Willy Wonka



[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