Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iICub-0000Xl-7h for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Oct 2019 14:25:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iICuZ-0005Y5-RH for pgsql-bugs@arkaria.postgresql.org; Wed, 09 Oct 2019 14:25:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iICrN-0005FG-Ta for pgsql-bugs@lists.postgresql.org; Wed, 09 Oct 2019 14:22:38 +0000 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1iICrL-0005Na-NT for pgsql-bugs@lists.postgresql.org; Wed, 09 Oct 2019 14:22:36 +0000 Received: by mail-wr1-x444.google.com with SMTP id o18so3220509wrv.13 for ; Wed, 09 Oct 2019 07:22:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=7c3sWp3mZ8JZU3wD+9FrvEJO2JzSZetaqQ+D6zF5qKA=; b=rZKPOb3wEdwHrTfIy3OqNK1y/ld85XESTI9I2L8/vxEgH0N7CfIBdal1frrhhCCijB BcvUMxn4KHJ/upxYoXSjeAlQws154VIe+wMoGhzZJpA4MOHoJVaVUS6radLRlpE86psr H7fArgQE4hCy4rkIBUwS8pAO03OWEzeuWwldWZqgdeASUflUWEQAbKn4+hnxxWLBv+Pd 1fN3ZoFg5ABHFx43bN3aCRp1EkvJSMT+9Y4rZsCY26/0Oq/UnG2JCe95Ly1ZyysZjS0C S+Xn5ZN8wfDk16Vm4CRXGaT8AGlj38d45BFvw8rksWnyADJ4i7KWeVS7ZRhUvdY9jR/F 1www== 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-transfer-encoding :content-language; bh=7c3sWp3mZ8JZU3wD+9FrvEJO2JzSZetaqQ+D6zF5qKA=; b=DGb9Y0OE7myW8eGeOjqIAFYMja2Gy2CUQsJILRpJG5bb8g77d9beUSYsJhYR2kaqjt 2Mtt9A3+hXK+ohDaYo8rDD+CdbxF7GODo8DloYzKJtuwrC2WsTZGljVsoHF+iKj1LlBM tnwpUE6R4+KINv0Q7UZQa7ixH+YRc7DFQX+l6c1AZkPqwhOi4qtRluOMjWRRUXBmfu5O ZazOToQ7K2fFClHQsF5/AfCKHm4GsIoaHSVtU4vL86nZBsn59mJKTPzcDgQVpNZsXgZq irQzB7ijHNaAVt4902iCjM6uL0rn8KHyO26/s7pRZLZddgHi+Y2qTqp9HzCFGA7xMr+Y doOg== X-Gm-Message-State: APjAAAXPj8r59+PZM9rxzx/g5wBqFuzhJfwpL/imgY8MjTTsPdFlO080 h8Qu4sVYP70y/4h/l5G8H4YyXTu0 X-Google-Smtp-Source: APXvYqyPVVMeIexCdUa+Yns7q3S+9VzO7SU4ifoI+ymD5qUS8nzAZy8ygEM1qOx9UU6lvG88nvq0cA== X-Received: by 2002:a5d:4691:: with SMTP id u17mr3150717wrq.41.1570630953857; Wed, 09 Oct 2019 07:22:33 -0700 (PDT) Received: from [192.168.91.47] ([80.83.66.234]) by smtp.gmail.com with ESMTPSA id w7sm2953986wmd.22.2019.10.09.07.22.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Oct 2019 07:22:32 -0700 (PDT) Subject: Re: Potential to_date(string, string) function malfunction To: Tom Lane Cc: pgsql-bugs@lists.postgresql.org References: <05d1d8b7-d1de-1ec7-7652-5b7ff5deaa65@gmail.com> <22301.1570549124@sss.pgh.pa.us> From: Pavel Pleva Message-ID: Date: Wed, 9 Oct 2019 16:22:31 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <22301.1570549124@sss.pgh.pa.us> Content-Type: text/plain; charset=iso-8859-2; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Thanks for reply, don't have access to PG v10 so good to know. Best regards Pavel Pleva Dne 08. 10. 19 v 17:38 Tom Lane napsal(a): > Pavel Pleva writes: >> I'd like to report you in my opinion weird behaviour of function >> to_date(string, string). According to specs using format 'YYYY-MM-DD' in >> months portion it should tolerate 01-12 and in days portion 01-31. But >> if you try "SELECT to_date('2019-30-50', 'YYYY-MM-DD') instead of >> throwing error it outputs "2021-07-23". >> This is output of 'SELECT version();' on our system: "PostgreSQL 9.4.23 >> on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red >> Hat 4.8.5-36), 64-bit" > PG v10 and later throw an error for this. > > regards, tom lane