count problem

Started by frank_lupoalmost 24 years ago3 messagesgeneral
Jump to latest
#1frank_lupo
frank_lupo@email.it

I have a problem to count.
This aggregate return int8, if possibile create count int4 ?

Bye !!
Frank Lupo (Wolf) !!

--
Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f

Sponsor:
Iscriviti al "club primo capitolo" di Airbook.it.
Clicca qui: http://adv2.email.it/cgi-bin/foclick.cgi?mid=346&d=6-5

#2scott.marlowe
scott.marlowe@ihs.com
In reply to: frank_lupo (#1)
Re: count problem

On Mon, 6 May 2002, frank_lupo@email.it wrote:

I have a problem to count.
This aggregate return int8, if possibile create count int4 ?

Bye !!
Frank Lupo (Wolf) !!

You can always force the output to be in4 like so:

select count(*)::int4 from some_table where some_where_clause

#3Daniel Morgan
danmorg@sc.rr.com
In reply to: frank_lupo (#1)
Re: count problem

What about a cast?

SELECT CAST(COUNT(*) AS INT4) FROM SOMETABLE;

I haven't actually tried that query.

-----Original Message-----
From: pgsql-general-owner@postgresql.org
[mailto:pgsql-general-owner@postgresql.org] On Behalf Of
frank_lupo@email.it
Sent: Monday, May 06, 2002 3:33 PM
To: pgsql-general
Subject: [GENERAL] count problem

I have a problem to count.
This aggregate return int8, if possibile create count int4 ?

Bye !!
Frank Lupo (Wolf) !!

--
Prendi GRATIS l'email universale che... risparmia: http://www.email.it/f

Sponsor:
Iscriviti al "club primo capitolo" di Airbook.it.
Clicca qui: http://adv2.email.it/cgi-bin/foclick.cgi?mid=346&d=6-5

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org