datatype preceded by underscore creates array - Mailing list pgsql-general

From George Pavlov
Subject datatype preceded by underscore creates array
Date
Msg-id 8C5B026B51B6854CBE88121DBF097A8651DB95@ehost010-33.exch010.intermedia.net
Whole thread Raw
Responses Re: datatype preceded by underscore creates array  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-general
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));
                                ^


pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: function for current date-time
Next
From: Martijn van Oosterhout
Date:
Subject: Re: old Pg interface