Re: Operator is not unique

2019-09-30 Thread Tom Lane
Adrian Klaver writes: > The list of extensions that you sent earlier are fairly common. I would > not expect them to be contributing to the below otherwise there would > have been more reports of what you are seeing. A quick "grep" shows that there is nothing named "day_inc" in core Postgres no

Re: Operator is not unique

2019-09-30 Thread Adrian Klaver
On 9/30/19 7:28 AM, PegoraroF10 wrote: your select returns no records but if I use WHERE p.proname ~ 'day_inc' instead of WHERE p.proname OPERATOR(pg_catalog.~) '^(pg_catalog.day_inc)$' Yeah I was not paying attention to what it was really looking for, the function name. The list of extensio

Re: Operator is not unique

2019-09-30 Thread PegoraroF10
your select returns no records but if I use WHERE p.proname ~ 'day_inc' instead of WHERE p.proname OPERATOR(pg_catalog.~) '^(pg_catalog.day_inc)$' Schema Name Result data type Argument data types Type pg_catalog day_inc anyelemen

Re: Operator is not unique

2019-09-30 Thread Adrian Klaver
On 9/30/19 5:48 AM, PegoraroF10 wrote: This select gives me: ERROR: more than one function named "pg_catalog.day_inc" In psql: \df pg_catalog.day_inc Or if you cannot get to psql then the query behind the above: SELECT n.nspname as "Schema", p.proname as "Name", pg_catalog.pg_get_functi

Re: Operator is not unique

2019-09-30 Thread PegoraroF10
This select gives me: ERROR: more than one function named "pg_catalog.day_inc" -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Operator is not unique

2019-09-30 Thread PegoraroF10
SELECT * FROM pg_extension; extname, extversion plpgsql,1.0 pg_stat_statements,1.6 pg_trgm,1.4 tablefunc,1.0 unaccent,1.1 pageinspect,1.7 -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Operator is not unique

2019-09-27 Thread Adrian Klaver
On 9/27/19 2:44 PM, PegoraroF10 wrote: oprname oprkind oprleft oprrightoprresult oprcode + b 170022832283pg_catalog.day_inc + b 228317002283pg_catalog.day_inc Not sure if it will provide any useful informa

Re: Operator is not unique

2019-09-27 Thread Adrian Klaver
On 9/27/19 2:44 PM, PegoraroF10 wrote: oprname oprkind oprleft oprrightoprresult oprcode + b 170022832283pg_catalog.day_inc + b 228317002283pg_catalog.day_inc In addition to Tom's comment about above, have

Re: Operator is not unique

2019-09-27 Thread Tom Lane
PegoraroF10 writes: > oprname oprkind oprleft oprright > oprresult oprcode > + b 170022832283pg_catalog.day_inc > + b 228317002283pg_catalog.day_inc Hm, I wonder what that is. It'd evidently m

Re: Operator is not unique

2019-09-27 Thread PegoraroF10
oprname oprkind oprleft oprright oprresult oprcode + l 0 20 20 int8up + l 0 21 21 int2up + l 0 23 23 int4up + l 0 700

Re: Operator is not unique

2019-09-26 Thread Adrian Klaver
On 9/25/19 1:14 PM, PegoraroF10 wrote: format_type format_type castfunccastcontext castmethod bigint smallint714 a f bigint integer 480 a f bigint real652 i f bigint double precision482 i f bigint numeric

Re: Operator is not unique

2019-09-25 Thread PegoraroF10
format_type format_type castfunccastcontext castmethod bigint smallint714 a f bigint integer 480 a f bigint real652 i f bigint double precision4

Re: Operator is not unique

2019-09-25 Thread Adrian Klaver
On 9/25/19 6:38 AM, PegoraroF10 wrote: Doing a inner join with pg_proc I´ll get this result. So, none of this casts I´ve created. Column prorettype is different, this is the problem ? select format_type(castsource, NULL), format_type(casttarget, NULL), castfunc, castcontext, castmethod, pr.* fr

Re: Operator is not unique

2019-09-25 Thread PegoraroF10
Doing a inner join with pg_proc I´ll get this result. So, none of this casts I´ve created. Column prorettype is different, this is the problem ?select format_type(castsource, NULL), format_type(casttarget, NULL),castfunc, castcontext, castmethod, pr.* from pg_cast inner join pg_proc pr on castfunc

Re: Operator is not unique

2019-09-24 Thread Adrian Klaver
On 9/24/19 7:18 AM, PegoraroF10 wrote: Nope, seems I didn´t create anything. SELECT * FROM pg_operator WHERE oid = '+(numeric, bigint)'::regoperator; ERROR: operator does not exist: +(numeric, bigint) Ok, I can cast, it works. But why works without casting for you and not for me ? Per Tom's s

Re: Operator is not unique

2019-09-24 Thread PegoraroF10
Nope, seems I didn´t create anything. SELECT * FROM pg_operator WHERE oid = '+(numeric, bigint)'::regoperator; ERROR: operator does not exist: +(numeric, bigint) Ok, I can cast, it works. But why works without casting for you and not for me ? -- Sent from: https://www.postgresql-archive.org/Po

Re: Operator is not unique

2019-09-24 Thread Fabrízio de Royes Mello
Em ter, 24 de set de 2019 às 10:52, PegoraroF10 escreveu: > > I don´t know if I did. > I think you did. > PostgreSQL 11.5 (Ubuntu 11.5-1.pgdg16.04+1) on x86_64-pc-linux-gnu, compiled > by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609, 64-bit > Take a look: postgres=# SELECT version();

Re: Operator is not unique

2019-09-24 Thread Tom Lane
PegoraroF10 writes: > If I do ... > select 1::NUMERIC + 1::BIGINT; > I get ... > [42725] ERROR: operator is not unique: numeric + bigint Hint: Could not > choose a best candidate operator. You might need to add explicit type casts. This doesn't happen for me. > This error means I have more than

Re: Operator is not unique

2019-09-24 Thread PegoraroF10
I don´t know if I did. PostgreSQL 11.5 (Ubuntu 11.5-1.pgdg16.04+1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.11) 5.4.0 20160609, 64-bit -- Sent from: https://www.postgresql-archive.org/PostgreSQL-general-f1843780.html

Re: Operator is not unique

2019-09-24 Thread Fabrízio de Royes Mello
Em ter, 24 de set de 2019 às 10:35, PegoraroF10 escreveu: > > If I do ... > select 1::NUMERIC + 1::BIGINT; > > I get ... > [42725] ERROR: operator is not unique: numeric + bigint Hint: Could not > choose a best candidate operator. You might need to add explicit type casts. > Witch version are you