ERROR: syntax error at or near "(" when creating a new table

postgresql

Solution

There is no type as `integer(...)`, choose `smallint`, `integer` or `bigint` given the ranges here: http://www.postgresql.org/docs/current/interactive/datatype-numeric.html

Problem

I am extremely new to PostgreSQL and every time I try to create a new table, I run into the following error: ``` ERROR: syntax error at or near "(" LINE 1: ..." ("id_azucarusuario" SERIAL, "id_usuario" integer(128) NOT ... ``` Here is the SQL for the table I am trying to define: ``` CREATE TABLE "public"."usuario_azucar" ( "id_azucarusuario" SERIAL, "id_usuario" integer(128) NOT NULL, "codigogeneral" character varying(240) NOT NULL, "razonsocial" character(240), "nombrecomercial" character(240), "nit" integer(128), "nummatricula" integer(128), "direccionempresa" character(240), "subdepartamento" character(240), "subciudad" character(240), "subdireccion" character varying(240), "subcalle" character varying(240), "subreferencia" character varying(240), "subtelefono" integer(128), "subpagweb" character(240), "subemail" character varying(240), "rai" character varying(240), "descripcion_proceso_azucar" character varying(240), "descripcion_proceso_alcohol" character varying(240), "balance_energeticoomasic" character varying(240), "productos_obtenidos" character varying(240), "capacidad_azuoalco" character varying(240), "capacidadreal_azuoalcoho" character varying(240), PRIMARY KEY ("id_azucarusuario") ) WITHOUT OIDS; ```

Original source