Skip site navigation (1) Skip section navigation (2)

Re: Tablefunc crosstab error messages

From: Noah Misch <noah(at)leadboat(dot)com>
To: Mali Akmanalp <mali(at)akmanalp(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Tablefunc crosstab error messages
Date: 2012-10-03 16:21:20
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Mon, Aug 27, 2012 at 08:07:02PM -0400, Mali Akmanalp wrote:
> Returning the type information to the caller seems like a pain
> but compatCrosstabTupleDescs already has instances in it where it fails
> with an error message, so I propose we just do that and tell the user the
> expected and actual types here, instead of returning false here and
> throwing a generic error message in the caller.
> What do you think? Let me know so I can write up a patch for you guys.

That would prove helpful, +1 from me.

> Also, just curious, is the reason the query passed into crosstab is a
> string (rather than an SQL expression) that it's just easier to implement
> that way?

Yes.  Accepting the query as proper SQL syntax would require modifying the
backend grammar.  Extensions cannot do that, but they can define functions
accepting a string and run it as a SQL command.

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2012-10-03 16:26:42
Subject: Re: do we EXEC_BACKEND on Mac OS X?
Previous:From: Boszormenyi ZoltanDate: 2012-10-03 16:15:58
Subject: Re: [PATCH] Make pg_basebackup configure and start standby [Review]

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group