X-Original-To: pgsql-interfaces-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 83A719FB247 for ; Mon, 14 Aug 2006 10:38:34 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 73248-02 for ; Mon, 14 Aug 2006 13:38:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by postgresql.org (Postfix) with ESMTP id 2F6DC9FA2AD for ; Mon, 14 Aug 2006 10:38:25 -0300 (ADT) Received: by py-out-1112.google.com with SMTP id n25so180185pyg for ; Mon, 14 Aug 2006 06:38:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Iq/eco5UuKEd94WOb5pvk8vqxzpRaLvXkWPX4ECQvIlgdpT42Am2VluXc7BLk5ZB9WN98H0Oz5qYdAxK7ruN9JOCYSXEhuHPgv32/4lEqwB8pHtZS0g7jpIX7hL+WqbnWbP8iA8jWQge7BzGtDvQXxIzneDCVlrV+XW1Q7GsVm4= Received: by 10.35.77.1 with SMTP id e1mr13280152pyl; Mon, 14 Aug 2006 06:38:23 -0700 (PDT) Received: by 10.35.115.8 with HTTP; Mon, 14 Aug 2006 06:38:23 -0700 (PDT) Message-ID: Date: Mon, 14 Aug 2006 15:38:23 +0200 From: Andro To: pgsql-interfaces@postgresql.org Subject: leaving out paramTypes parameter MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.199 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, SPF_PASS X-Spam-Level: X-Archive-Number: 200608/19 X-Sequence-Number: 6233 Hi, from the documentation, here's PQexecParams prototype PGresult *PQexecParams(PGconn *conn, const char *command, int nParams, const Oid *paramTypes, const char * const *paramValues, const int *paramLengths, const int *paramFormats, int resultFormat); and PQprepare's PGresult *PQprepare(PGconn *conn, const char *stmtName, const char *query, int nParams, const Oid *paramTypes); they both require "paramTypes" parameter, but documentation says "If paramTypes is NULL, or any particular element in the array is zero, the server assigns a data type to the parameter symbol in the same way it would do for an untyped literal string." How reliable is that? Can we really leave out this parameter anytime? What are known issues? Or should we try at all costs to specify parameters type? Thanks Charles