Search Postgresql Archives

datatype preceded by underscore creates array

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

 



Is there any special meaning to preceding a datatype (or at least some
datatypes) in a table or function definition by underscore that is a
synonym for an array? I can't see it documented anywhere. Below are some
examples. The other question is why "_int4" parses to int[], but "_int"
does not, etc. This is on PostgreSQL 8.1.3 Linux.

gp=> create table a1 (b _int4);
CREATE TABLE
gp=> \d a1
         Table "mnp.a1"
 Column |   Type    | Modifiers 
--------+-----------+-----------
 b      | integer[] | 

gp=> create table a2 (b _char);
CREATE TABLE
gp=> \d a2
        Table "mnp.a2"
 Column |   Type   | Modifiers 
--------+----------+-----------
 b      | "char"[] | 

gp=> create table a3 (b _int);
ERROR:  type "_int" does not exist

gp=> create table a4 (b _char(1));
ERROR:  syntax error at or near "(" at character 25
LINE 1: create table a4 (b _char(1));
                                ^



[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