X-Original-To: pgsql-docs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A95CC3A419D for ; Tue, 2 Nov 2004 23:31:47 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 37964-04 for ; Tue, 2 Nov 2004 23:31:36 +0000 (GMT) Received: from flake.decibel.org (flake.decibel.org [66.143.173.58]) by svr1.postgresql.org (Postfix) with ESMTP id 732803A418F for ; Tue, 2 Nov 2004 23:31:37 +0000 (GMT) Received: by flake.decibel.org (Postfix, from userid 1001) id 86F8A1C8FC; Tue, 2 Nov 2004 23:31:36 +0000 (GMT) Date: Tue, 2 Nov 2004 17:31:36 -0600 From: "Jim C. Nasby" To: Peter Eisentraut Cc: David Fetter , PostgreSQL Docs Subject: Re: Array function Message-ID: <20041102233136.GS55164@decibel.org> References: <20041101003614.GG13884@fetter.org> <20041101195913.GF55164@decibel.org> <20041101203847.GC11825@fetter.org> <200411012311.31733.peter_e@gmx.net> <20041102204342.GQ55164@decibel.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041102204342.GQ55164@decibel.org> X-Operating-System: FreeBSD 4.10-RELEASE-p3 i386 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200411/12 X-Sequence-Number: 2647 Here's an example I just thought of that would be great to document: I have an array of integers. I'd like to also associate some names with them. I can't do this in the same array, but I can do it in a different array. But how do I ensure that when I build that array using name=ARRAY(SELECT name FROM table WHERE id = ANY(id_array) ) that name[1] actually corresponds to id_array[1]? On Tue, Nov 02, 2004 at 02:43:42PM -0600, Jim C. Nasby wrote: > The datatypes chapter mentions nothing about ARRAY(), for starters. I'm > not suggesting that the reference is incomplete, but I think a chapter > explaining some about arrays, how to use them, and what you can do with > them would be useful. > > On Mon, Nov 01, 2004 at 11:11:31PM +0100, Peter Eisentraut wrote: > > David Fetter wrote: > > > Anyhow, where do you think it should go? > > > > In the chapter on data types -- where it already is. > > > > -- > > Peter Eisentraut > > http://developer.postgresql.org/~petere/ > > > > > > ---------------------------(end of broadcast)--------------------------- > > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org > > > > -- > Jim C. Nasby, Database Consultant decibel@decibel.org > Give your computer some brain candy! www.distributed.net Team #1828 > > Windows: "Where do you want to go today?" > Linux: "Where do you want to go tomorrow?" > FreeBSD: "Are you guys coming, or what?" > > ---------------------------(end of broadcast)--------------------------- > TIP 6: Have you searched our list archives? > > http://archives.postgresql.org > -- Jim C. Nasby, Database Consultant decibel@decibel.org Give your computer some brain candy! www.distributed.net Team #1828 Windows: "Where do you want to go today?" Linux: "Where do you want to go tomorrow?" FreeBSD: "Are you guys coming, or what?"