简体   繁体   中英

error with parenthesis on pgSQL

using phpPgAdmin, I've tried to create a table in my database. But am getting an error after it has generated its code.

SQL error:

ERROR:  syntax error at or near "(" at character 91

CREATE TABLE "public"."main_products_common_dimensions" ("id" SERIAL, "product_id" integer(3) NOT NULL, "h_ft" character varying(15), "h_in" character varying(15), "w_ft" character varying(15), PRIMARY KEY ("id")) WITHOUT OIDS

What could be wrong with the parenthesis?

The problem - you cannot specify precision for integer type, so integer(3) is invalid type. Use numeric(3) or simple integer .

没有integer(3) :postgresql integer总是4个字节,有符号。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM