Re: function to return rows as columns?

From: Sim Zacks <sim(at)compulab(dot)co(dot)il>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: function to return rows as columns?
Date: 2009-03-01 15:21:16
Message-ID: goe957$dr7$1@news.hub.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> I think this approach have a problem (almost with my data), i have a
> somewhat large number of different sizes, about 200 or so (although i
> have a presented a limited example i now). Thanks anyway by the
> alternative way to do it Andreas.
>
Actually the crosstab function won't work for you if you need something
more then the basic one or two columns. (IIRC).
Building a dynamic sql string such as Andreas suggested will always give
you exactly what you want.

Sim
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmqp+wACgkQjDX6szCBa+r2IgCgpEGq1obqHtWcbbbdchm2cT1e
ShEAniOg/qut+DXQS2mwvSvAMtiE7eOi
=wKIf
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Linos 2009-03-01 17:04:25 Re: strange performance problem (SOLVED)
Previous Message Pavel Stehule 2009-03-01 15:18:15 Re: when to use "execute" in plpgsql?