pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rob Sargent <robjsargent@gmail.com>
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: Adrian Klaver <adrian.klaver@aklaver.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Re: function defined (or not), more worries on version 10->14 upgrade
Date: Fri, 15 Apr 2022 15:30:19 -0600
Message-ID: <d4caa24a-10f6-adf2-45a3-6894a7f90d97@gmail.com> (raw)
In-Reply-To: <CAKFQuwYJd2yaWNR6eJqGtgJG5ehy+ScwpwAhzToSFp1ipBq=qw@mail.gmail.com>
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>
	<CAKFQuwYJd2yaWNR6eJqGtgJG5ehy+ScwpwAhzToSFp1ipBq=qw@mail.gmail.com>

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

view thread (16+ messages)  latest in thread

Message-ID: <d4caa24a-10f6-adf2-45a3-6894a7f90d97@gmail.com>
Permalink:  ../d4caa24a-10f6-adf2-45a3-6894a7f90d97@gmail.com/
Also on:    postgresql.org/message-id/d4caa24a-10f6-adf2-45a3-6894a7f90d97@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: robjsargent@gmail.com, david.g.johnston@gmail.com, adrian.klaver@aklaver.com, tgl@sss.pgh.pa.us
  Subject: Re: function defined (or not), more worries on version 10->14 upgrade
  In-Reply-To: <d4caa24a-10f6-adf2-45a3-6894a7f90d97@gmail.com>
  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> <CAKFQuwYJd2yaWNR6eJqGtgJG5ehy+ScwpwAhzToSFp1ipBq=qw@mail.gmail.com> <d4caa24a-10f6-adf2-45a3-6894a7f90d97@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox