Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfTWR-0003DP-0T for pgsql-general@arkaria.postgresql.org; Fri, 15 Apr 2022 21:30:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nfTWP-0000mF-SC for pgsql-general@arkaria.postgresql.org; Fri, 15 Apr 2022 21:30:29 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfTWP-0000m6-BQ for pgsql-general@lists.postgresql.org; Fri, 15 Apr 2022 21:30:29 +0000 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nfTWI-0001X8-O5 for pgsql-general@postgresql.org; Fri, 15 Apr 2022 21:30:28 +0000 Received: by mail-pg1-x52d.google.com with SMTP id r66so8635893pgr.3 for ; Fri, 15 Apr 2022 14:30:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to; bh=df8Kz9UFMwB3h2XDF9j5k2FQdAq1jgC9Zv4mNfbmmDQ=; b=qqk/aEYv4DfeKdpK9ZtZ6hEoEPZg90yV+V81YIckz5K18IV4hgPvcdC7Ct3yQUkCHh L5J76+f0k6IcmosfIukERB+L1NW58Bn4e0vrxhF+T7VHgH6ugzm5OW63cXOPKp3CXFTZ nsdPb9T82JaL8GNf/t9KECIS+hD36RT9rRKV16SKvOdz2rdu44lbsD0iM651j1hyvWmJ VFgxNIl3Xlf93Mm2ChzWMXEOv3m7wqEgmmCo61HkFV6kKKwQOtX3QLqfkW3otP/fY1Oj vhNe3v/VmuiR9UTlJSML6GYDkFCgglI9Is/sEdusIcuUzvaWc46/ufkJ1PTkIr0zDdOX jI2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to; bh=df8Kz9UFMwB3h2XDF9j5k2FQdAq1jgC9Zv4mNfbmmDQ=; b=YQYcoXrUNhAiSaV5lKiSdJrI5ERPcfE4BBGo8MXtj1P74zmfMX/RScyJ+q/9jDCI2j t/muwriHPh7U96kMzoUnu15CkxX3mFFbc7wVVNKdC284nJyA6BxiIC+jKzvnlFzxwOdL 6aa05B0PiQmGyaQfmLQpkppWTRgPyD18+ZdZ9rQJqKEurGKW7UsQowkqhSi/r1h3UMLl GZ/fVfmz7WBsBiceYlWWGet+2UV5BgzIQtoglgnlN0qIohJ9quhiu35mM89z/o78J2Li E2FdzW5wMg1QNCrinw+vZUiq48R99/jgizJYVZU97MzQLOIgplNO7EpySoeS3AOvf7sc nT8w== X-Gm-Message-State: AOAM530pQZrU8lWSw27yIydqLia+vPq7Z0jp4Ne1FxEshf04Ft2gZAw4 x1GhQmU60Zgqy7chFdCE3qY= X-Google-Smtp-Source: ABdhPJz2hZNvSMIYQCSfM6X8e/bESFDFkJXN0Q6z711nTO8y5sgZwzMFFqiQrP4ujfCm1DNCHzX2OQ== X-Received: by 2002:a62:ed0b:0:b0:505:7675:1119 with SMTP id u11-20020a62ed0b000000b0050576751119mr814056pfh.4.1650058221713; Fri, 15 Apr 2022 14:30:21 -0700 (PDT) Received: from [10.128.71.194] ([155.98.131.2]) by smtp.gmail.com with ESMTPSA id k4-20020a17090a3e8400b001cd37f6c0b7sm5458296pjc.46.2022.04.15.14.30.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 15 Apr 2022 14:30:21 -0700 (PDT) Content-Type: multipart/alternative; boundary="------------0XMRUHonIqaiv10vr6z8pzqh" Message-ID: Date: Fri, 15 Apr 2022 15:30:19 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: function defined (or not), more worries on version 10->14 upgrade Content-Language: en-CA To: "David G. Johnston" Cc: Adrian Klaver , Tom Lane , "pgsql-general@postgresql.org" References: <1c00b419-2507-f018-3579-2529ed8d6de5@gmail.com> <1653697.1650042859@sss.pgh.pa.us> <44d8ca64-af6a-6ff8-1a6a-e19d8f75885c@aklaver.com> <4100be2d-7fa3-8aec-2a49-7702b7249581@gmail.com> From: Rob Sargent In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is a multi-part message in MIME format. --------------0XMRUHonIqaiv10vr6z8pzqh Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 4/15/22 15:18, David G. Johnston wrote: > On Fri, Apr 15, 2022 at 2:04 PM Rob Sargent wrote: > > but have not found a combination of name/args for > genome_threshold_mono(text,text,double precision) > > > Per the fine documentation: > > \df[anptwS+] [ pattern [ arg_pattern ... ] ] > > So the correct formulation is: > > \df genome_threshold_mono text text 'double precision' > > You need to quote the fourth argument to protect the embedded space as > a character and not an argument separator. > > David J. > Wow.  An old bad habit of using parens, I guess? Do you consider this correct behaviour? barnard=# \df public.genome_threshold_mono text,text List of functions  Schema |         Name          | Result data type |                  Argument data types | Type --------+-----------------------+------------------+--------------------------------------------------------+------  public | genome_threshold_mono | uuid             | pbs_name text, genome_name text                        | func  public | genome_threshold_mono | uuid             | pbs_name text, genome_name text, conf double precision | func (2 rows) i.e, is it automatically wildcarded? And then, I dare say, this is just plain inconsistent, vis parens barnard=# \sf public.genome_threshold_mono text,text ERROR:  invalid name syntax barnard=# \sf+ public.genome_threshold_mono text,text ERROR:  invalid name syntax barnard=# \sf+ public.genome_threshold_mono(text,text)         CREATE OR REPLACE FUNCTION public.genome_threshold_mono(pbs_name text, genome_name text)          RETURNS uuid          LANGUAGE plpgsql 1       AS $function$ 2       declare 3         tid uuid; 4       begin 5         select genome_threshold_mono(pbs_name, genome_name, 1.96) into tid; 6         return tid; 7       end; 8       $function$ But I'm taking it all as not an upgrade problem, getting back to work Thanks to all, rjs --------------0XMRUHonIqaiv10vr6z8pzqh Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit
On 4/15/22 15:18, David G. Johnston wrote:
On Fri, Apr 15, 2022 at 2:04 PM Rob Sargent <robjsargent@gmail.com> wrote:
but have not found a combination of name/args for genome_threshold_mono(text,text,double precision)


Per the fine documentation:

\df[anptwS+] [ pattern [ arg_pattern ... ] ]

So the correct formulation is:

\df genome_threshold_mono text text 'double precision'

You need to quote the fourth argument to protect the embedded space as a character and not an argument separator.

David J.

Wow.  An old bad habit of using parens, I guess?

Do you consider this correct behaviour?

barnard=# \df public.genome_threshold_mono text,text
                                                 List of functions
 Schema |         Name          | Result data type |                  Argument data types                   | Type
--------+-----------------------+------------------+--------------------------------------------------------+------
 public | genome_threshold_mono | uuid             | pbs_name text, genome_name text                        | func
 public | genome_threshold_mono | uuid             | pbs_name text, genome_name text, conf double precision | func
(2 rows)

i.e, is it automatically wildcarded?

And then, I dare say, this is just plain inconsistent, vis parens
barnard=# \sf public.genome_threshold_mono text,text
ERROR:  invalid name syntax
barnard=# \sf+ public.genome_threshold_mono text,text
ERROR:  invalid name syntax
barnard=# \sf+ public.genome_threshold_mono(text,text)
        CREATE OR REPLACE FUNCTION public.genome_threshold_mono(pbs_name text, genome_name text)
         RETURNS uuid
         LANGUAGE plpgsql
1       AS $function$
2       declare
3         tid uuid;
4       begin
5         select genome_threshold_mono(pbs_name, genome_name, 1.96) into tid;
6         return tid;
7       end;
8       $function$

But I'm taking it all as not an upgrade problem, getting back to work
Thanks to all,
rjs

--------------0XMRUHonIqaiv10vr6z8pzqh--