Thread: 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
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
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