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

Re: [HACKERS] (stupid) bug in agg_select_candidate

From: David Sauer <davids(at)iol(dot)cz>
To: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] (stupid) bug in agg_select_candidate
Date: 1998-12-23 11:49:13
Message-ID: m2u2ynt6x2.fsf@iol.cz (view raw or flat)
Thread:
Lists: pgsql-hackers
>>>> "Thomas" == Thomas G Lockhart <lockhart(at)alumni(dot)caltech(dot)edu> writes:

    >> I'm trying postgres 6.4.1 and I have problem with select command:
    >> > create table t( text_column text );
    >> > select sum( text_column ) from t;
    >> This command makes no sense, but causes crash in backend:

    Thomas> Thanks for finding this. It was in new code for automatic type matching
    Thomas> and coersion on aggregate functions to help implement aggregates for the
    Thomas> string types.

    Thomas> I've enclosed a simple patch which fixes the problem, and which at the
    Thomas> same time makes a nicer warning message as a result:

    Thomas> postgres=> select sum(c) from cc;
    Thomas> ERROR:  Unable to select an aggregate function sum(bpchar)
    Thomas> postgres=> select min(c) from cc;
    Thomas> min
    Thomas> ----------
    Thomas> abc
    Thomas> (1 row)

    Thomas> Will commit to the cvs tree sometime soon; let me know if you have any
    Thomas> continuing problems. Good luck.

Thanks, works fine.
			Happy Xmas,
				David  

-- 
* David Sauer, student of Czech Technical University
* electronic mail: davids(at)iol(dot)cz (mime compatible)

In response to

pgsql-hackers by date

Next:From: David SauerDate: 1998-12-23 13:26:06
Subject: bug(?) if int8 as primary key
Previous:From: Thomas G. LockhartDate: 1998-12-23 07:00:27
Subject: Re: [HACKERS] (stupid) bug in agg_select_candidate

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