View previous topic :: View next topic |
Author |
Message |
pactoo Guru
Joined: 18 Jul 2004 Posts: 553
|
Posted: Mon Nov 28, 2005 2:55 pm Post subject: postgresql: create an integer with limited length |
|
|
Hello,
I have a problem with postgresql 7.4 in that the statement:
Code: |
CREATE TABLE schema.table ( "User" varchar(64) NOT NULL default '', "Uid" int(11) NOT NULL default '-1');
|
fails. Works, if the fieldlength for integer has not been specified:
Code: |
CREATE TABLE schema.table ( "User" varchar(64) NOT NULL default '', "Uid" int NOT NULL default '-1' );
|
Now, I am new to sql, but I have found a lot of different sql scripts in the internet specifically for postgresql that use a statement like int(11), which at least here produces a reproducable error.
Basically this is taken from a script for storing pureftpd users in a postgres database. So I wonder wether integer(n) is wrong sql or an misconfiguration an my side. |
|
Back to top |
|
|
jk3us Apprentice
Joined: 14 Mar 2005 Posts: 201 Location: Memphis, TN
|
|
Back to top |
|
|
pactoo Guru
Joined: 18 Jul 2004 Posts: 553
|
Posted: Tue Nov 29, 2005 10:08 am Post subject: |
|
|
So the types are database dependend and not standarized by sql (yeah, I know, it QUERY language). Thanks very much for your input.
So I'd probably just had bad luck with my search for postgres scripts. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|