Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfb68-0008CT-Oy for pgsql-general@arkaria.postgresql.org; Tue, 07 Apr 2015 21:31:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Yfb68-0008Kh-4O for pgsql-general@arkaria.postgresql.org; Tue, 07 Apr 2015 21:31:52 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Yfb67-0008KY-3G; Tue, 07 Apr 2015 21:31:51 +0000 Received: from mail-bl2on0665.outbound.protection.outlook.com ([2a01:111:f400:fc09::665] helo=na01-bl2-obe.outbound.protection.outlook.com) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Yfb63-0004m1-E4; Tue, 07 Apr 2015 21:31:49 +0000 Received: from decina.local (70.113.16.71) by CY1PR11MB0682.namprd11.prod.outlook.com (25.163.236.20) with Microsoft SMTP Server (TLS) id 15.1.130.23; Tue, 7 Apr 2015 21:31:41 +0000 Message-ID: <55244CB7.50901@BlueTreble.com> Date: Tue, 7 Apr 2015 16:31:35 -0500 From: Jim Nasby User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Gerardo Herzig , Suresh Raja CC: , Subject: Re: [SQL] check data for datatype References: <1981538304.72853.1428425986418.JavaMail.root@fmed.uba.ar> In-Reply-To: <1981538304.72853.1428425986418.JavaMail.root@fmed.uba.ar> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [70.113.16.71] X-ClientProxiedBy: BLUPR05CA0078.namprd05.prod.outlook.com (10.141.20.48) To CY1PR11MB0682.namprd11.prod.outlook.com (25.163.236.20) Authentication-Results: postgresql.org; dkim=none (message not signed) header.d=none; X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CY1PR11MB0682; X-Forefront-Antispam-Report: BMV:1; SFV:NSPM; SFS:(10009020)(6009001)(51704005)(377454003)(479174004)(24454002)(92566002)(19580395003)(50466002)(23676002)(86362001)(65956001)(66066001)(36756003)(47776003)(33656002)(2950100001)(83506001)(40100003)(50986999)(54356999)(76176999)(42186005)(77156002)(46102003)(87976001)(64126003)(65816999)(15975445007)(122386002)(62966003)(336755003)(18886065003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR11MB0682; H:decina.local; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(5002010)(5005006); SRVR:CY1PR11MB0682; BCL:0; PCL:0; RULEID:; SRVR:CY1PR11MB0682; X-Forefront-PRVS: 0539EEBD11 X-OriginatorOrg: bluetreble.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2015 21:31:41.7069 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR11MB0682 X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-general Precedence: bulk Sender: pgsql-general-owner@postgresql.org On 4/7/15 11:59 AM, Gerardo Herzig wrote: > I guess that could need something like (untested) > > delete from bigtable text_column !~ '^[0-9][0-9]*$'; Won't work for... .1 -1 1.1e+5 ... Really you need to do something like what Jerry suggested if you want this to be robust. -- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general