Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 54E6A633B5A for ; Mon, 18 May 2009 09:34:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 64322-01 for ; Mon, 18 May 2009 09:34:47 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.30]) by mail.postgresql.org (Postfix) with ESMTP id A08A96323D8 for ; Mon, 18 May 2009 09:34:54 -0300 (ADT) Received: by yx-out-2324.google.com with SMTP id 8so1811561yxg.73 for ; Mon, 18 May 2009 05:34:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=ku/VUbi30i1GSCejtuU+0iYDgGv1Y75KdR12mBCd3ZQ=; b=bVj8vtpU3gV60e8ZnXcmCAXNBX86dSRUkuHZZAYB7wePef/AUriGr62Mqr6d5VInze KTpB6sqPc85bppGIi2xFRG7FfiDX6uKl66bYt0WXj22Pe80dFi+ty5+BuvWJ6f0HSUtA Bog1SgZVNKLoj8MYv1mQrGwjmZ/qSnLtzcoPM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=BF31h9fThAV6TLN18K8Z4yWEuvd7WLRl03l6vMcK/niXbCOcC/Ngyn3s+Mc1bsAxbs aEdytDO/ZAhGn/kF4cJzOD9I5DdUDipbDH9ZJNljXb7yip0FN5thjUcBb+n8Y7+AHVEv J7QmS/gvSnD6l4J/mL2jE+4yWfo1zpni0llbQ= MIME-Version: 1.0 Received: by 10.151.131.5 with SMTP id i5mr12610160ybn.18.1242650091702; Mon, 18 May 2009 05:34:51 -0700 (PDT) In-Reply-To: <4A115CFA.9080906@fmed.uba.ar> References: <4A1154A5.80608@fmed.uba.ar> <937d27e10905180457u32399574o9413511deaf69eee@mail.gmail.com> <4A115CFA.9080906@fmed.uba.ar> Date: Mon, 18 May 2009 14:34:51 +0200 Message-ID: <162867790905180534h5a53df39r1cd1ce7cada091f3@mail.gmail.com> Subject: Re: proposal for a CookBook in postgresql.org From: Pavel Stehule To: Gerardo Herzig Cc: Dave Page , postgres list Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.563 tagged_above=0 required=5 tests=AWL=0.563 X-Spam-Level: X-Archive-Number: 200905/78 X-Sequence-Number: 32570 2009/5/18 Gerardo Herzig : > Dave Page wrote: >> On Mon, May 18, 2009 at 1:29 PM, Gerardo Herzig wrote: >> >>> I think this is a good time to propose some kind of CookBook, to >>> preserve this kind of answers. >> >> What, like this one? >> >> http://wiki.postgresql.org/wiki/Snippets >> >> :-) >> > Oops. Yeah, kind of :) > Did not see any direct link from "Docs" main page. > > this is usual tricks for arrays - you ca use it for min, max, avg, sort for arrays. In 8.4 is possible to use generate_subscripts functions. regards Pavel Stehule others tricks http://www.postgres.cz/index.php/PostgreSQL_SQL_Tricks regards Pavel Stehule