1. PostgreSQL reports syntax error with precision specified integers, example: "INT(10)"
2. PostgreSQL reports syntax error with use of "unsigned" with integers.
3. No autoincrement in PostgreSQL !!!! :(
The following doesn't work:
CREATE TABLE {rsvp} (rid int(10) unsigned NOT NULL auto_increment,
nid int(10) unsigned NOT NULL default '0',
uid int(10) unsigned NOT NULL default '0',
name varchar(128) default '',
invite_text text,
blind int(3) unsigned NOT NULL default '0',
list_email int(3) unsigned NOT NULL default '0',
allow_invite int(3) unsigned NOT NULL default '0',
timestamp int(10) unsigned NOT NULL default '0',
PRIMARY KEY (rid,uid,nid));
The following works:
CREATE TABLE rsvp (rid int NOT NULL,
nid int NOT NULL default '0',
uid int NOT NULL default '0',
name varchar(128) default '',
invite_text text,
blind int NOT NULL default '0',
list_email int NOT NULL default '0',
allow_invite int NOT NULL default '0',
timestamp int NOT NULL default '0',
PRIMARY KEY (rid,uid,nid));
So this looks like a no-go without PostgreSQL "sequences" instructions.
Comments
Comment #1
havran commentedNote only. Autoincrement field should be serial type, it's postgresql eq. to mysql autoincrement:
Comment #2
wdtj commentedThat wasn't quite right either. int should be serial, it's not a modifier. Also there is no enum.
Here's what I used and it seems to work:
Comment #3
owahab commentedComment #4
owahab commentedComment #5
owahab commentedComment #6
(not verified) commented