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 09854D1B37B for ; Thu, 10 Jun 2004 13:59:14 -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 32490-08 for ; Thu, 10 Jun 2004 16:59:11 +0000 (GMT) Received: from smtp-out2.xs4all.nl (smtp-out2.xs4all.nl [194.109.24.12]) by svr1.postgresql.org (Postfix) with ESMTP id 15DC3D1B377 for ; Thu, 10 Jun 2004 13:59:08 -0300 (ADT) Received: from xs1.xs4all.nl (xs1.xs4all.nl [194.109.21.2]) by smtp-out2.xs4all.nl (8.12.10/8.12.10) with ESMTP id i5AGwpPl065385; Thu, 10 Jun 2004 18:58:51 +0200 (CEST) Received: from xs1.xs4all.nl (jtv@localhost.xs4all.nl [127.0.0.1]) by xs1.xs4all.nl (8.12.10/8.12.10) with ESMTP id i5AGwpfr030328; Thu, 10 Jun 2004 18:58:51 +0200 (CEST) (envelope-from jtv@xs4all.nl) Received: (from jtv@localhost) by xs1.xs4all.nl (8.12.10/8.12.9/Submit) id i5AGwpui030326; Thu, 10 Jun 2004 18:58:51 +0200 (CEST) (envelope-from jtv) Date: Thu, 10 Jun 2004 18:58:51 +0200 From: "Jeroen T. Vermeulen" To: Tom Lane Cc: Stephane Raimbault , pgsql-interfaces@postgresql.org Subject: Re: libpq 7.4 and binary cursor Message-ID: <20040610165850.GB28191@xs4all.nl> Mail-Followup-To: Tom Lane , Stephane Raimbault , pgsql-interfaces@postgresql.org References: <1086877827.4646.22.camel@picasso.lan> <20040610150411.GD27490@xs4all.nl> <25064.1086881965@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <25064.1086881965@sss.pgh.pa.us> User-Agent: Mutt/1.4.1i 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/30 X-Sequence-Number: 4958 On Thu, Jun 10, 2004 at 11:39:25AM -0400, Tom Lane wrote: > 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. I stand corrected. Perhaps this is something that changed in C99 because too many programs used this trick, or because enough platforms supported it. Note, however, that this is about pointers to unions (and ``suitably converted,'' whatever that means; there are cases where pointer type conversions may involve the addition or subtraction of an offset, so there are situations where you need to be careful about how exactly you convert your pointers). The code we're talking about had a union object, but no pointers. So the part about registerization still holds. Jeroen