X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CDEF2D1B295 for ; Thu, 10 Jun 2004 12:39:56 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 97165-02 for ; Thu, 10 Jun 2004 15:39:54 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 20517D1B2A8 for ; Thu, 10 Jun 2004 12:39:53 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5AFdP1g025065; Thu, 10 Jun 2004 11:39:25 -0400 (EDT) To: "Jeroen T. Vermeulen" Cc: Stephane Raimbault , pgsql-interfaces@postgresql.org Subject: Re: libpq 7.4 and binary cursor In-reply-to: <20040610150411.GD27490@xs4all.nl> References: <1086877827.4646.22.camel@picasso.lan> <20040610150411.GD27490@xs4all.nl> Comments: In-reply-to "Jeroen T. Vermeulen" message dated "Thu, 10 Jun 2004 17:04:12 +0200" Date: Thu, 10 Jun 2004 11:39:25 -0400 Message-ID: <25064.1086881965@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/29 X-Sequence-Number: 4957 "Jeroen T. Vermeulen" writes: > This trick may work on some compilers and/or platforms, but it's not > correct C. The language does not guarantee that the members of a union > will be allocated in the exact same address, or even that they will > overlap. Nonsense. C99 6.7.2.1: A pointer to a union object, suitably converted, points to each of its members (or if a member is a bit-field, then to the unit in which it resides), and vice versa. It does say that the results of fetching a union member other than the one last stored to are implementation-dependent, but not that the implementation can choose to put them in different places. regards, tom lane