Search Postgresql Archives

Re: Oddity in column specifications for table creation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marc Munro <marc@xxxxxxxxxxxx> writes:
> This works fine:
>     "str2"                varchar(40)
> This does not:
>     "str2"                "pg_catalog"."varchar"(40)

Yeah.  That's because in all existing PG releases, type modifiers are
handled by hard-wired grammar productions that *only* work for VARCHAR,
CHARACTER VARYING, and so on, treated as keywords.

Teodor did some remarkable work for 8.3, fixing things so that any type
name could have modifiers attached, without (we hope ;-)) breaking any
cases that worked before.  It had previously been assumed that this was
impossible, because a type-name-plus-modifier looks just about
indistinguishable from a function call, but he managed to find a way
that side-stepped all the grammatical ambiguities.  Your examples all
work fine in CVS HEAD.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux