Re: datatype preceded by underscore creates array

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: George Pavlov <gpavlov(at)mynewplace(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: datatype preceded by underscore creates array
Date: 2006-10-16 19:39:42
Message-ID: 20061016193942.GF23302@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Oct 16, 2006 at 12:33:35PM -0700, George Pavlov wrote:
> 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.

Yep, the array type is represented internally by prefixings an
underscore. It's mentioned somewhere in the docs, but you may as well
ignore it.

"int4" is the actual type name, "integer" is the sql standard name.
PostgreSQL displays SQL compliant output where possible. _int simply
doesn't exist, and oddities like (3) after the char does have array
support at all...

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Oleg Bartunov 2006-10-16 19:40:37 Re: old Pg interface
Previous Message Martijn van Oosterhout 2006-10-16 19:36:13 Re: old Pg interface