Обсуждение: BUG #8749: Error Size Integer

Поиск
Список
Период
Сортировка

BUG #8749: Error Size Integer

От
leandroeiro@msn.com
Дата:
The following bug has been logged on the website:

Bug reference:      8749
Logged by:          Leandro
Email address:      leandroeiro@msn.com
PostgreSQL version: 9.1.0
Operating system:   Ubuntu
Description:

I tried to change the Integer size and appears this:


ERROR:  syntax error at or near "("
LINE 1: ...jgovce_jevents_vevent" ALTER COLUMN "ev_id" TYPE integer(12)
                                                                   ^


No bloco:
ALTER TABLE "public"."jgovce_jevents_vevent" ALTER COLUMN "ev_id" TYPE
integer(12)

Re: BUG #8749: Error Size Integer

От
David Johnston
Дата:
leandroeiro wrote
> The following bug has been logged on the website:
>
> Bug reference:      8749
> Logged by:          Leandro
> Email address:

> leandroeiro@

> PostgreSQL version: 9.1.0
> Operating system:   Ubuntu
> Description:
>
> I tried to change the Integer size and appears this:
>
>
> ERROR:  syntax error at or near "("
> LINE 1: ...jgovce_jevents_vevent" ALTER COLUMN "ev_id" TYPE integer(12)
>                                                                    ^
>
>
> No bloco:
> ALTER TABLE "public"."jgovce_jevents_vevent" ALTER COLUMN "ev_id" TYPE
> integer(12)

You cannot "change the Interger size" using "(n)" notation.

From the documentation:

http://www.postgresql.org/docs/current/static/datatype-numeric.html#DATATYPE-INT

"SQL only specifies the integer types integer (or int), smallint, and
bigint. The type names int2, int4, and int8 are extensions, which are also
used by some other SQL database systems."

So not only is your syntax wrong but you are trying to create a size that
does not exist - i.e., 12

David J.




--
View this message in context:
http://postgresql.1045698.n5.nabble.com/BUG-8749-Error-Size-Integer-tp5785906p5785916.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.