Received: from maia.hub.org (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id E0CB8632D9B for ; Wed, 17 Mar 2010 13:29:38 -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 17461-09 for ; Wed, 17 Mar 2010 16:29:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from serv01.siteground178.com (ns1.siteground178.com [67.15.255.19]) by mail.postgresql.org (Postfix) with ESMTP id 89D2F6326F0 for ; Wed, 17 Mar 2010 13:29:26 -0300 (ADT) Received: from [67.15.255.19] (port=50752 helo=intermodalsoftwaresolutions.net) by serv01.siteground178.com with esmtpa (Exim 4.69) (envelope-from ) id 1Nrw7X-0006xp-Ik for pgsql-sql@postgresql.org; Wed, 17 Mar 2010 11:29:23 -0500 Received: from phpmailer ([76.106.235.204]) by intermodalsoftwaresolutions.net with HTTP (PHPMailer); Wed, 17 Mar 2010 11:29:23 -0500 Date: Wed, 17 Mar 2010 11:29:23 -0500 To: pgsql-sql@postgresql.org From: Michael Gould Subject: strange issue with UUID data types Message-ID: X-Priority: 3 X-Mailer: PHPMailer [version 1.71] X-Mailer: FeLaMiMail MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="b1_ff3fa5e776e6a57b7fd9cefe5aeecda2" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - serv01.siteground178.com X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - intermodalsoftwaresolutions.net X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.626 tagged_above=-10 required=5 tests=AWL=0.972, BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201003/138 X-Sequence-Number: 33845 --b1_ff3fa5e776e6a57b7fd9cefe5aeecda2 Content-Type: text/plain; charset = "iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm running Windows 2008 64 bit server with Postgres 8.4.2 (also have = tried Windows 7 both 32 and 64 bit).=A0 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.=A0=20 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.=A0 All of the child tables column which I'm = returning the parent tables UUID are defined as UUID data types and no default = value.=A0 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=A0 Windows 2008 standard server = with Postgres 8.4.2 loaded and it's schema's loaded from a pgdumpall.=A0=20 They are also running the same SQL Anywhere version 10 that we're = converting the data from.=A0 When we run the same code on that machine it runs = properly and the UUID returned is correct.=A0 I've tried this on his remote server = and it works. Is there something I'm missing here?=A0 Is there somekind of environmental parameter that I need to set?=A0 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 =A0 -- Michael Gould, Managing Partner Intermodal Software Solutions, LLC 904.226.0978 904.592.5250 fax --b1_ff3fa5e776e6a57b7fd9cefe5aeecda2 Content-Type: text/html; charset = "iso-8859-1" Content-Transfer-Encoding: quoted-printable

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

 


Michael Gould, Managing Partner
Intermodal Software Solutions, LLC
904.226.0978
904.592.5250 fax
--b1_ff3fa5e776e6a57b7fd9cefe5aeecda2--