Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 20B156327DE for ; Fri, 28 May 2010 07:31:27 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 55991-07 for ; Fri, 28 May 2010 10:31:19 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtpcorp.com (smtpcorp.com [67.192.120.76]) by mail.postgresql.org (Postfix) with ESMTP id B4B1C62D9D2 for ; Fri, 28 May 2010 07:31:19 -0300 (ADT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpcorp.com; s=main; h=Content-Transfer-Encoding:Content-Type:Mime-Version:References:Message-ID:Date:Subject:From:To; bh=LWXmawr23pH18q2Cf9Q+WsJXXno47fV8mdjaJ6Me6SI=; b=N+TCMlMeiNjxSTD383LCARO+C1wUzbzLY71RZKjpqzsfj11n1rImoy+Fu+Et5axFzaB4qHx064A1JgtATIokcgQaj/YV13TWNHAFQ1uIhT0MLMco8Hn/8lzBnCWfpo5H; Received: from ip-118-90-136-187.xdsl.xnet.co.nz ([118.90.136.187] helo=gonzo) by smtpcorp.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.70) id 1OHwqU-0008Cl-8W; mid 144 for pgsql-sql@postgresql.org; Fri, 28 May 2010 10:30:54 +0000 Received: from news by gonzo with local (Exim 4.69) (envelope-from ) id 1OHwqK-00074l-Dj for pgsql-sql@postgresql.org; Fri, 28 May 2010 22:31:08 +1200 To: pgsql-sql@postgresql.org Path: not-for-mail From: Jasen Betts Newsgroups: gmane.comp.db.postgresql.sql Subject: Re: cast record type to array? Date: 28 May 2010 10:31:03 GMT Organization: Dis (not Dat) Organisation Lines: 12 Message-ID: References: <4BFD9A6C.1060203@fmed.uba.ar> NNTP-Posting-Host: localhost Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: reversiblemaps.ath.cx 1275042663 27105 127.0.0.1 (28 May 2010 10:31:03 GMT) X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s; a +M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W; (T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6 {T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q; 8 "9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^ User-Agent: slrn/pre1.0.0-2 (Linux) X-Smtpcorp-Track: 3482935.1.2899569 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.8 tagged_above=-5 required=5 tests=BAYES_50=0.8 X-Spam-Level: X-Archive-Number: 201005/137 X-Sequence-Number: 34185 On 2010-05-26, Gerardo Herzig wrote: > Hi all. Im not being able to cast a record variable into an array. > > Im writing a trigger, and i would like to store NEW (and OLD) as text[]. > There is a way to do it in plpgsql? (w/o any contrib modules) why not store them as text instead? new::text is a valid cast.