"Daniel Verite" <dan...@manitou-mail.org> writes: > Tom Lane wrote: >> Is there a way to implement pivoting as a set-returning function?
> Not with the same ease of use. We have crosstab functions > in contrib/tablefunc already, but the killer problem with PIVOT > is that truly dynamic columns are never reachable directly. I'm not sure how pushing it out to psql makes that better. There is no way to do further processing on something that psql has printed, so you've punted on solving that issue just as much if not more. I agree that the crosstab solution leaves a lot to be desired as far as ease of use goes, but I don't want to define fixing its ease-of-use problem as being "it's easy for manual use in psql". psql is a minority API, you know. Besides which, psql is not all that great for looking at very wide tables, so I'm not sure that this would be very useful for dynamic column sets anyway. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers