Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 92E98B61DD2; Thu, 2 Jun 2011 10:30:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 31850-05; Thu, 2 Jun 2011 13:30:49 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qw0-f46.google.com (mail-qw0-f46.google.com [209.85.216.46]) by mail.postgresql.org (Postfix) with ESMTP id 0FCB2B61DF1; Thu, 2 Jun 2011 10:30:48 -0300 (ADT) Received: by qwk3 with SMTP id 3so366129qwk.19 for ; Thu, 02 Jun 2011 06:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=+D1cIqWqxCcP2U6OT1ghuxjLWlzQLM7kD0FYnO3EtXE=; b=r+e+3yx6uYP/5A9lq/BecujzooZFeQQUl57jdi4vhFlPhBgp/wnCo3s8z29+NqulY5 fFuaK8AEdarztRFPBkdJJkeGg49uQLmj3/q6qlraW7rIyguUnzpJfuNL/xzQRp1zd8vS EUJOOAvNHCvRpfpvpVqR29c5nKA2GIt7yc7c4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=aZlJZrn5vD9zIdXQjNRLS4935QX2kKII2qWSubImIR5QpQb9p3NdYeIzTnqvt0HqX/ JDy7iwwgvwmCghchbZ55a+FBHXQ6SfhbzHj1XOhwsOXc+2rBpcyol6lG72+dQVQArn6d IKdmaqEXIGN8PgcOA6Wq4siK1YGiTt+fhzg0I= MIME-Version: 1.0 Received: by 10.224.216.70 with SMTP id hh6mr517721qab.83.1307021449139; Thu, 02 Jun 2011 06:30:49 -0700 (PDT) Received: by 10.224.54.147 with HTTP; Thu, 2 Jun 2011 06:30:49 -0700 (PDT) In-Reply-To: <16110385996.20110602112418@gf.microolap.com> References: <147534417.20110601184310@gf.microolap.com> <16110385996.20110602112418@gf.microolap.com> Date: Thu, 2 Jun 2011 08:30:49 -0500 Message-ID: Subject: Re: PQdeleteTuple function in libpq From: Merlin Moncure To: Pavel Golub Cc: PostgreSQL Hackers , pgsql-interfaces@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.898 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RFC_ABUSE_POST=0.001 X-Spam-Level: X-Archive-Number: 201106/114 X-Sequence-Number: 188827 On Thu, Jun 2, 2011 at 3:24 AM, Pavel Golub wrote: > MM> well, you have PQaddTuple, but this was exposed mainly for the purpos= e > MM> of building a PQresult from outside the libpq library -- not so much > MM> to remove the 'constness' property of the PGResult. =A0I have no > MM> philosophical objection to making the PGresult able to be manipulated > MM> in that fashion (although others might). > > From this point of view why we have PQmakeEmptyPGresult, PQcopyResult, > PQsetResultAttrs, PQsetvalue and PQresultAlloc? If we have these > functions I suppose we must have one more to delete (or hide) some > tuples/attributes. These functions were basically supported for libpqtypes -- a libpq wrapping library that needed to be able to construct a result outside of libpq...libpqtypes uses the result api to expose arrays and composite types sent over the wire from the server. However, once generated the result is basically immutable. merlin