Re: function defined (or not), more worries on version 10->14 upgrade
От | Rob Sargent |
---|---|
Тема | Re: function defined (or not), more worries on version 10->14 upgrade |
Дата | |
Msg-id | d4caa24a-10f6-adf2-45a3-6894a7f90d97@gmail.com обсуждение исходный текст |
Ответ на | Re: function defined (or not), more worries on version 10->14 upgrade ("David G. Johnston" <david.g.johnston@gmail.com>) |
Ответы |
Re: function defined (or not), more worries on version 10->14 upgrade
|
Список | pgsql-general |
On 4/15/22 15:18, David G. Johnston wrote:
Wow. An old bad habit of using parens, I guess?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.
Do you consider this correct behaviour?
barnard=# \df public.genome_threshold_mono text,texti.e, is it automatically wildcarded?
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)
And then, I dare say, this is just plain inconsistent, vis parens
barnard=# \sf public.genome_threshold_mono text,textBut I'm taking it all as not an upgrade problem, getting back to work
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$
Thanks to all,
rjs
В списке pgsql-general по дате отправления: