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

array variables

From: "Marcin Krawczyk" <jankes(dot)mk(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: array variables
Date: 2008-11-13 09:08:35
Message-ID: 95f6bf9b0811130108l4041650es77a21674d825f43@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-sql
Hi all. Can anyone help me solve this problem ? Say I have something like
this:

CREATE TEMP TABLE idx (id integer, p integer, idd integer);
INSERT INTO idx (id, p, idd) VALUES (3048, 1, 12043);
INSERT INTO idx (id, p, idd) VALUES (3048, 2, 2321);
INSERT INTO idx (id, p, idd) VALUES (3048, 5, 12002);
INSERT INTO idx (id, p, idd) VALUES (3048, 6, 2387);
INSERT INTO idx (id, p, idd) VALUES (3048, 13, 4301);
INSERT INTO idx (id, p, idd) VALUES (3048, 16, 1022);
INSERT INTO idx (id, p, idd) VALUES (3048, 19, 321);
INSERT INTO idx (id, p, idd) VALUES (3049, 2, 7543);
INSERT INTO idx (id, p, idd) VALUES (3050, 1, 56324);
INSERT INTO idx (id, p, idd) VALUES (3050, 2, 8746);

How do I put (SELECT * FROM idx) into multidimensional array variable ?
(plpgsql) Is is possible at all ?


regards
mk

Responses

pgsql-sql by date

Next:From: Marcin KrawczykDate: 2008-11-13 09:13:30
Subject: Re: array variables
Previous:From: Helio Campos Mello de AndradeDate: 2008-11-12 22:14:09
Subject: Invitation to connect on LinkedIn

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