Skip site navigation (1) Skip section navigation (2)

Re: Array of Arrays of int

From: Leo Fink <leo(dot)fink(at)gmx(dot)net>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Array of Arrays of int
Date: 2005-05-02 04:26:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
Hello Tom.

Am 02.05.2005 um 06:11 schrieb Tom Lane:

> Leo Fink <leo(dot)fink(at)gmx(dot)net> writes:
>> Why does
>> select array(select array[1,2]);
>> give me an error: "could not find array type for data type integer[]"?
> We don't do arrays of arrays.  You seem to be hoping for a 2-D array,
> which is something fundamentally different (even though some 
> programming
> languages consider them the same ;-))

Actually, I don't. In my application I can work around the problem by 
using an array of string representations of these pairs, or by using 
two arrays of ints. I just thought that was less elegant and I was 
missing something obvious.

Thanks for your quick response.


In response to

pgsql-sql by date

Next:From: Ramakrishnan MuralidharanDate: 2005-05-02 04:49:17
Subject: Re: trigger/rule question
Previous:From: hatuanDate: 2005-05-02 04:15:04
Subject: Re: Division in Postgre

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group