Re: how do i count() similar items

From: jackassplus <jackassplus(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: how do i count() similar items
Date: 2010-09-08 19:22:03
Message-ID: bfaab403-5fd0-421d-af18-2e30bdbfde08@p22g2000pre.googlegroups.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


<snip> 
> To ensure data integrity,
> you should probably create a fruit_type table with a unique column that
> lists the possible types, and then foreign key the fruit_type column in
> the fruits table to that to ensure nothing funky is entered.  An enum
> for type is another possibility.

In the real world, this column actiually holds Operating Systems.
I have 7 variants of Windows XP, even more of server, a dozen *nixes,
etc, etc and it is fed from an external app.
So I am looking for a magic query, or even a perl function to wrap up
insde a procedure, whatever.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2010-09-08 19:30:15 Re: Memory Errors
Previous Message tamanna madaan 2010-09-08 19:11:54 Re: error while autovacuuming