Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e48KD-00023Q-Ue for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Oct 2017 16:33:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1e48KD-00033D-Cw for pgsql-bugs@arkaria.postgresql.org; Mon, 16 Oct 2017 16:33:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1e48KC-00032z-Tq for pgsql-bugs@postgresql.org; Mon, 16 Oct 2017 16:33:08 +0000 Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1e48K5-0003Hm-G0 for pgsql-bugs@postgresql.org; Mon, 16 Oct 2017 16:33:08 +0000 Received: by mail-wm0-x230.google.com with SMTP id 196so5896262wma.1 for ; Mon, 16 Oct 2017 09:33:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ArSSJ77eRqabBRmGvJcAbTCRbR+sXkWkiUT/CNk7VrQ=; b=LYEBuaggEd5QLjlzI7dU8k/yZ9RREUIY8uL9aNNo6Us0nVjtZjltG/2oI09H5Zoxwt FAUzEdDrweR5wuAxt/qBsX5+u4YVRAGtES6mbOlZFTeG9NjBRC6NlAROQKtwMofh5wWJ ijgZmMS0MRbztqnFpjZGD8PWdrXtb9X+Yf6UzjJPqG+Aw+rI/CfZqUsv+MCFB4wCjH4e kTn+5TOTlYncXxvssEPNI/K4gRYBA5ejtJixB1SGBRienMFPGG8e8evPmtwvUdzaZ0Yc IzaYZ1yEr8yOLL2oVJrb3OY62VLMQptZTR7KCNmmu5ptOz+0LN/y79ClAW0AN2jlvCxv 34KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=ArSSJ77eRqabBRmGvJcAbTCRbR+sXkWkiUT/CNk7VrQ=; b=UvDrdW69IaZ90gzj8eMZdPTw6WqnKi3zKSknQuaGvUhp6KjMlVNjwgaTBpWOLbQDtU w6Ujxq9VHSlW9dXknhCB2hNHvMbiJW10v1c1oEIiYBhypSo2IXry5BflzjONsRsqSfyA GIDh4PM/Syo9MGaSMw8HeGmC5556fy02mLFdmkl3cJqwviod92SMvaDyJedUSJ7zqOIb 60HjLM2U0XG0i2FiAypIJ0Ket/CPvslDocpMWQ+lkZsWoD3UQNgRFrl3sUTHtgMXYFFo 4QwkQjFQnDOy+LXQkFI9ak4btLQx/bnwgXT+2gdZVYRAttGirSSm/hbhXYAhSeuNOAAq KYEQ== X-Gm-Message-State: AMCzsaVMChKby37pTvsVNmtbtt92XIq2E+Lg6cJBEcrUjxHcd3IUXR+p riUNYa/CXDvBa7RoUl2j3XANdyw0jVQzSw/w0KGMCPZM0zjTVhAK3EGYacNdaq3apZ1IQZO8XPZ LQwsZpiCjauDlhCoFiYtC8CaN1vsmc7UlBApeAbGpHR4BMeB5zT9RUq78Bj07jD3fOzg4Mjm0Qj w/U884 X-Google-Smtp-Source: ABhQp+SXFbIHDikAONjo0P/WzbUH/9krZWEfywlEV2c7Rejhi1R7xxGGnIHPTN2qKAha5OQ5t+Er/Q== X-Received: by 10.28.55.2 with SMTP id e2mr1478129wma.60.1508171580371; Mon, 16 Oct 2017 09:33:00 -0700 (PDT) Received: from [10.137.2.19] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id q4sm6007305wmd.19.2017.10.16.09.32.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Oct 2017 09:32:59 -0700 (PDT) Subject: Re: BUG #14853: Parameter type is required even when the query does not need to know the type To: =?UTF-8?Q?Eduardo_P=c3=a9rez_Ureta?= , "David G. Johnston" Cc: pgsql-bugs@postgresql.org References: <20171013140350.8210.40918@wrigleys.postgresql.org> From: Tomas Vondra Message-ID: Date: Mon, 16 Oct 2017 18:32:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org Hi, On 10/16/2017 05:24 PM, Eduardo Pérez Ureta wrote: > I have an application that I am trying to make it work in PostgreSQL and > PostgreSQL seems to be the only database that does not support queries like: > SELECT 1 WHERE ? IS NULL > with a Java setTimestamp parameter. > So you're passing a timestamp value to PostgreSQL only to find out if it's NULL? I don't want to be rude, but that seems a bit ... strange. > > You say PostgreSQL is strongly typed, but an unknown type is accepted > in the cases I presented before. > As David already pointed out before, these examples are not equal. In the other cases PostgreSQL can easily infer the data type from other parts of the query (e.g. target column in an INSERT). But that's not the case here. > > Do you mean that PostgreSQL is not following the SQL standard? > Can you kindly point us to the part where SQL Standard requires the behavior you're requesting? thanks -- Tomas Vondra http://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs