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

[Feature request] variable declaration of anonymous composite data type in PL/pgSQL

From: Maciej Mrozowski <reavertm(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: [Feature request] variable declaration of anonymous composite data type in PL/pgSQL
Date: 2010-03-01 23:08:31
Message-ID: 201003020008.32101.reavertm@gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
Hello,

Not sure whether it's appropriate list for feature requests though..
Would it be suitable to implement such variable declarations in PL/pgSQL so 
that following (or similar) constructs would be possible?

DECLARE
	tmpStruct (name varchar, foo integer, bar boolean)[] := array[
('somename', 1, true),
('someothername', 2, false),
('yetothername', 3, true)
	];
BEGIN
...

Or maybe it is possible already? (I know there are temporary tables but it's 
not quite the same). The goal to have temporary local random access data 
structures (like lookup tables), similar to those in C.

-- 
regards
MM

Responses

pgsql-hackers by date

Next:From: Kevin GrittnerDate: 2010-03-01 23:09:56
Subject: Re: function side effects
Previous:From: Ed L.Date: 2010-03-01 23:03:23
Subject: Re: Hung postmaster (8.3.9)

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