Received: from news.tht.net (news.hub.org [216.126.91.242]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f02F8pL83474 for ; Tue, 2 Jan 2001 10:08:51 -0500 (EST) (envelope-from news@news.tht.net) Received: (from news@localhost) by news.tht.net (8.9.3/8.9.3) id JAA46647 for pgsql-sql@postgresql.org; Tue, 2 Jan 2001 09:52:33 -0500 (EST) (envelope-from news) X-Authentication-Warning: news.tht.net: news set sender to using -f From: Ron Peterson X-Newsgroups: comp.databases.postgresql.sql Subject: Re: Looking for comments Date: Tue, 02 Jan 2001 09:52:32 -0500 Organization: Yellowbank Lines: 17 Message-ID: <3A51EB30.DD1A5FA5@yellowbank.com> References: <3A4E8B1F.F5A29E3B@altern.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.tht.net 978447152 46644 138.110.30.68 (2 Jan 2001 14:52:32 GMT) X-Complaints-To: scrappy@hub.org X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.4.0-test9 i686) X-Accept-Language: en To: pgsql-sql@postgresql.org X-Archive-Number: 200101/14 X-Sequence-Number: 675 Thomas SMETS wrote: > > > ISBN's have a checkdigit; it would be sensible to provide a > function to be used in a CHECK constraint to ensure that the > ISBN is valid. > Here's a URL with more information:http://www.isbn.spk-berlin.de/html/userman/usm4.htm. I've written a similar algorithm in C to create and verify checksums for eight digit codes. The final code is then 9 digits. I did this to help create codes that are the same length as a social security number. If you'd like a copy, let me know. -Ron-