Re: [SQL] Crosstab limitation...

2007-11-30 Thread Tom Lane
"ronald tabada" <[EMAIL PROTECTED]> writes: > ... when I tried > producing reports with more than 17 columns it displayed the following > error message: > ERROR: invalid return type > SQL state: 42601 > Detail: Query-specified return tuple has 39 columns but crosstab returns 17. Worksforme. Mayb

[SQL] Crosstab limitation...

2007-11-30 Thread ronald tabada
Good day... I'm new in postgresql and I used PostgreSQL 8.2. I tried generating a query that can convert rows into columns. I was happy when I discovered the crosstab function. But when I tried producing reports with more than 17 columns it displayed the following error message: ERROR: invalid ret

Re: [SQL] Using schema

2007-11-30 Thread Scott Marlowe
On Nov 30, 2007 9:00 AM, Daniel Caune <[EMAIL PROTECTED]> wrote: > The cool thing with this, compared to the USE statement supported by > some other RDBMS, is that the user is not restricted to one given schema > without explicit schema declaration: > > SELECT * FROM foo;

[SQL] Using schema

2007-11-30 Thread Daniel Caune
Hi, I tried to figure out how to select a particular schema before executing statement on its objects without having to specify the schema in these statements (cf. the instruction USE supported in some other RDBMS) PostgreSQL allows modifying dynamically the schema search path: SET search_path

Re: [SQL] statement-level trigger sample out there?

2007-11-30 Thread hubert depesz lubaczewski
On Thu, Nov 29, 2007 at 04:04:54PM +0100, Christian Kindler wrote: > I have a realy big table (> 2'000'000 records). every second there are > several inserts and updates. the thing is i need a last row reference > depending on a foreing_key. > > something like this: > > id, foreign_key, last_