Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id A1FF6799CCD for ; Wed, 17 Mar 2010 13:40:54 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 19906-04 for ; Wed, 17 Mar 2010 16:40:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from out02.mta.xmission.com (out02.mta.xmission.com [166.70.13.232]) by mail.postgresql.org (Postfix) with ESMTP id D1635799CCA for ; Wed, 17 Mar 2010 13:40:43 -0300 (ADT) Received: from in02.mta.xmission.com ([166.70.13.52]) by out02.mta.xmission.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NrwIU-0003Fi-0v; Wed, 17 Mar 2010 10:40:42 -0600 Received: from [208.187.158.94] (helo=[172.16.1.233]) by in02.mta.xmission.com with esmtpsa (SSLv3:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1NrwIT-0006oM-S1; Wed, 17 Mar 2010 10:40:41 -0600 Message-ID: <4BA10687.6000409@gmail.com> Date: Wed, 17 Mar 2010 10:42:47 -0600 From: Rob Sargent User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100228 SUSE/3.0.3-1.1.1 Lightning/1.0b1 Thunderbird/3.0.3 MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: Re: strange issue with UUID data types References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-XM-SPF: eid=; ; ; mid=; ; ; hst=in02.mta.xmission.com; ; ; ip=208.187.158.94; ; ; frm=robjsargent@gmail.com; ; ; spf=neutral X-SA-Exim-Connect-IP: 208.187.158.94 X-SA-Exim-Rcpt-To: pgsql-sql@postgresql.org, rsargent@amirsys.com X-SA-Exim-Mail-From: robjsargent@gmail.com X-SA-Exim-Scanned: No (on in02.mta.xmission.com); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.253 tagged_above=-10 required=5 tests=AWL=0.346, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 201003/139 X-Sequence-Number: 33846 On 03/17/2010 10:29 AM, Michael Gould wrote: > I'm running Windows 2008 64 bit server with Postgres 8.4.2 (also have > tried Windows 7 both 32 and 64 bit). The origin database is SQL > Anywhere 10. > > I've got several tables that have a UUID data type with > isscontrib.uuid_generate_v4() as the default value. > > All of the tables where these are the primary key work just fine and > properly create the UUID columns. > > I also have several child tables that call into the parent table to > return the parent tables UUID. All of the child tables column which I'm > returning the parent tables UUID are defined as UUID data types and no > default value. On all of my machines the UUID returned from the parent > tables is always 16 bytes, in fact the numbers are not truncated they > don't make any sense or pattern. > > Now I would think that this could be a problem with my program not > having the proper length to hold the temporary data but I've also run > this on 2 other machines, one through teamviewer to Windows 2008 > standard server with Postgres 8.4.2 loaded and it's schema's loaded from > a pgdumpall. > > They are also running the same SQL Anywhere version 10 that we're > converting the data from. When we run the same code on that machine it > runs properly and the UUID returned is correct. I've tried this on his > remote server and it works. > > Is there something I'm missing here? Is there somekind of environmental > parameter that I need to set? We've been scratching our heads over this > for about 10 days now trying to figure out why it works in one location > and not others. > > Best Regards > > Michael Gould Given my recent history re: uuid's perhaps I shouldn't chime in here, but can't help myself. get/run pg_config to see how postgres was built and installed. It may be using ossp uuid support? 2. Are all the uuid libraries 64 bit? 3. Has the programme been migrated from 32 bit?