pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #8168: duplicated function signature
6+ messages / 4 participants
[nested] [flat]
* BUG #8168: duplicated function signature
@ 2013-05-17 10:31 vladimir.jovanovic@aparteko.com
2013-05-17 14:11 ` Re: BUG #8168: duplicated function signature Heikki Linnakangas <hlinnakangas@vmware.com>
0 siblings, 1 reply; 6+ messages in thread
From: vladimir.jovanovic@aparteko.com @ 2013-05-17 10:31 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 8168
Logged by: Vladimir Jovanović
Email address: vladimir.jovanovic@aparteko.com
PostgreSQL version: 8.4.11
Operating system: PostgreSQL 8.4.11 on x86_64-redhat-linux-gnu, com
Description:
Hi,
I noticed that I have two functions with the same signature.
sp_get_league_prediction(IN _id bigint, IN _rank integer, IN
_log_in_expectence double precision, IN _feathers_gained integer, IN
_tokens_all integer, IN _tokens_active integer, IN _score integer)
sp_get_league_prediction(_id bigint, _rank integer, _log_in_expectence
double precision, _feathers_gained integer, _tokens_all integer,
_tokens_active integer, _score integer)
Actually, I created first one with intention, but the second function
appeared when I executed the following code when I wanted to replace the
function:
CREATE OR REPLACE FUNCTION sp_get_league_prediction(IN _id bigint, IN _rank
integer, IN _log_in_expectence double precision, IN _feathers_gained
integer, IN _tokens_all integer, IN _tokens_active integer, IN _score
integer)
RETURNS SETOF record AS
$BODY$
DECLARE
BEGIN
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #8168: duplicated function signature
2013-05-17 10:31 BUG #8168: duplicated function signature vladimir.jovanovic@aparteko.com
@ 2013-05-17 14:11 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2013-05-17 14:39 ` Re: BUG #8168: duplicated function signature Tom Lane <tgl@sss.pgh.pa.us>
2013-05-17 15:53 ` Re: BUG #8168: duplicated function signature Vladimir Jovanovic <vladimir.jovanovic@aparteko.com>
0 siblings, 2 replies; 6+ messages in thread
From: Heikki Linnakangas @ 2013-05-17 14:11 UTC (permalink / raw)
To: vladimir.jovanovic@aparteko.com; +Cc: pgsql-bugs
On 17.05.2013 13:31, vladimir.jovanovic@aparteko.com wrote:
> I noticed that I have two functions with the same signature.
>
> sp_get_league_prediction(IN _id bigint, IN _rank integer, IN
> _log_in_expectence double precision, IN _feathers_gained integer, IN
> _tokens_all integer, IN _tokens_active integer, IN _score integer)
>
> sp_get_league_prediction(_id bigint, _rank integer, _log_in_expectence
> double precision, _feathers_gained integer, _tokens_all integer,
> _tokens_active integer, _score integer)
In addition to higher-level checks, there is a unique index in the
pg_proc catalog that should not let that happen, so to be honest, I find
that hard to believe. Are you 100% they have the same signature? Are
they in different schemas, perhaps? In psql, what does "\df
sp_get_league_prediction" return?
- Heikki
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #8168: duplicated function signature
2013-05-17 10:31 BUG #8168: duplicated function signature vladimir.jovanovic@aparteko.com
2013-05-17 14:11 ` Re: BUG #8168: duplicated function signature Heikki Linnakangas <hlinnakangas@vmware.com>
@ 2013-05-17 14:39 ` Tom Lane <tgl@sss.pgh.pa.us>
1 sibling, 0 replies; 6+ messages in thread
From: Tom Lane @ 2013-05-17 14:39 UTC (permalink / raw)
To: Heikki Linnakangas <hlinnakangas@vmware.com>; +Cc: vladimir.jovanovic@aparteko.com; pgsql-bugs
Heikki Linnakangas <hlinnakangas@vmware.com> writes:
> On 17.05.2013 13:31, vladimir.jovanovic@aparteko.com wrote:
>> I noticed that I have two functions with the same signature.
>>
>> sp_get_league_prediction(IN _id bigint, IN _rank integer, IN
>> _log_in_expectence double precision, IN _feathers_gained integer, IN
>> _tokens_all integer, IN _tokens_active integer, IN _score integer)
>>
>> sp_get_league_prediction(_id bigint, _rank integer, _log_in_expectence
>> double precision, _feathers_gained integer, _tokens_all integer,
>> _tokens_active integer, _score integer)
> In addition to higher-level checks, there is a unique index in the
> pg_proc catalog that should not let that happen, so to be honest, I find
> that hard to believe. Are you 100% they have the same signature? Are
> they in different schemas, perhaps? In psql, what does "\df
> sp_get_league_prediction" return?
If they are in different schemas, you'd probably need
\df *.sp_get_league_prediction
to see both.
regards, tom lane
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #8168: duplicated function signature
2013-05-17 10:31 BUG #8168: duplicated function signature vladimir.jovanovic@aparteko.com
2013-05-17 14:11 ` Re: BUG #8168: duplicated function signature Heikki Linnakangas <hlinnakangas@vmware.com>
@ 2013-05-17 15:53 ` Vladimir Jovanovic <vladimir.jovanovic@aparteko.com>
2013-05-17 16:10 ` Re: BUG #8168: duplicated function signature Heikki Linnakangas <hlinnakangas@vmware.com>
1 sibling, 1 reply; 6+ messages in thread
From: Vladimir Jovanovic @ 2013-05-17 15:53 UTC (permalink / raw)
To: Heikki Linnakangas <hlinnakangas@vmware.com>; +Cc: pgsql-bugs
Hi Heikki,
Here you can find attached .csv semicolon separated made by :"SELECT * FROM
pg_proc WHERE proname LIKE 'sp_get_league_prediction".
"\df sp_get_league_prediction" is also attached.
Both functions are returning the same setof record:
---------------------------
CREATE OR REPLACE FUNCTION sp_get_league_prediction(IN _id bigint, IN _rank
integer, IN _log_in_expectence double precision, IN _feathers_gained
integer, IN _tokens_all integer, IN _tokens_active integer, IN _score
integer)
RETURNS SETOF record AS
$BODY$
...
---------------------------
CREATE OR REPLACE FUNCTION sp_get_league_prediction(_id bigint, _rank
integer, _log_in_expectence double precision, _feathers_gained integer,
_tokens_all integer, _tokens_active integer, _score integer)
RETURNS SETOF record AS
$BODY$
...
On Fri, May 17, 2013 at 4:11 PM, Heikki Linnakangas <hlinnakangas@vmware.com
> wrote:
> On 17.05.2013 13:31, vladimir.jovanovic@aparteko.**com<vladimir.jovanovic@aparteko.com>wrote:
>
>> I noticed that I have two functions with the same signature.
>>
>> sp_get_league_prediction(IN _id bigint, IN _rank integer, IN
>> _log_in_expectence double precision, IN _feathers_gained integer, IN
>> _tokens_all integer, IN _tokens_active integer, IN _score integer)
>>
>> sp_get_league_prediction(_id bigint, _rank integer, _log_in_expectence
>> double precision, _feathers_gained integer, _tokens_all integer,
>> _tokens_active integer, _score integer)
>>
>
> In addition to higher-level checks, there is a unique index in the pg_proc
> catalog that should not let that happen, so to be honest, I find that hard
> to believe. Are you 100% they have the same signature? Are they in
> different schemas, perhaps? In psql, what does "\df
> sp_get_league_prediction" return?
>
> - Heikki
>
--
*Vladimir Jovanović* <http://www.aparteko.com/;
http://www.aparteko.com
CELL: +381 64 211 79 79
OFFICE: + 381 11 314 86 38
E-MAIL: vladimir.jovanovic@aparteko.com
[image: Description: cid:image001.png@01CD3D1C.7D977930]
setting standards in social gaming development
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
Attachments:
image001.png (image/png, 3.6K) download
view image
df sp_league_prediction.txt (text/plain, 1.1K) download
\df sp_get_league_prediction
List of functions
Schema | Name |
Result data type
|
Argument data types
| Type
--------+--------------------------+--------------------------------------------
--------------------------------------------------------------------------------
----------------------------------+---------------------------------------------
--------------------------------------------------------------------------------
--------------------------+--------
public | sp_get_league_prediction | TABLE(_id bigint, _rank integer, _log_in_ex
pectence double precision, _feathers_gained integer, _tokens_all integer, _token
s_active integer, _score integer) |
| normal
public | sp_get_league_prediction | SETOF record
| _id bigint, _rank integer, _log_in_expectenc
e double precision, _feathers_gained integer, _tokens_all integer, _tokens_activ
e integer, _score integer | normal
#8186.csv (text/csv, 863B) download
"proname";"pronamespace";"proowner";"prolang";"procost";"prorows";"provariadic";"proisagg";"proiswindow";"prosecdef";"proisstrict";"proretset";"provolatile";"pronargs";"pronargdefaults";"prorettype";"proargtypes";"proallargtypes";"proargmodes";"proargnames";"proargdefaults";"prosrc";"probin";"proconfig";"proacl"
"sp_get_league_prediction";"2200";"10";"1120780646";"100";"1000";"0";"f";"f";"f";"f";"t";"v";"0";"0";"2249";"";"{20,23,701,23,23,23,23}";"{t,t,t,t,t,t,t}";"{_id,_rank,_log_in_expectence,_feathers_gained,_tokens_all,_tokens_active,_score}";"";"
DECLARE
BEGIN
--body
END;";"";"";""
"sp_get_league_prediction";"2200";"10";"1120780646";"100";"1000";"0";"f";"f";"f";"f";"t";"v";"7";"0";"2249";"20 23 701 23 23 23 23";"";"";"{_id,_rank,_log_in_expectence,_feathers_gained,_tokens_all,_tokens_active,_score}";"";"
DECLARE
BEGIN
--body
END;";"";"";""
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #8168: duplicated function signature
2013-05-17 10:31 BUG #8168: duplicated function signature vladimir.jovanovic@aparteko.com
2013-05-17 14:11 ` Re: BUG #8168: duplicated function signature Heikki Linnakangas <hlinnakangas@vmware.com>
2013-05-17 15:53 ` Re: BUG #8168: duplicated function signature Vladimir Jovanovic <vladimir.jovanovic@aparteko.com>
@ 2013-05-17 16:10 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2013-05-17 16:25 ` Re: BUG #8168: duplicated function signature Vladimir Jovanovic <vladimir.jovanovic@aparteko.com>
0 siblings, 1 reply; 6+ messages in thread
From: Heikki Linnakangas @ 2013-05-17 16:10 UTC (permalink / raw)
To: Vladimir Jovanovic <vladimir.jovanovic@aparteko.com>; +Cc: pgsql-bugs
On 17.05.2013 18:53, Vladimir Jovanovic wrote:
> Hi Heikki,
>
> Here you can find attached .csv semicolon separated made by :"SELECT * FROM
> pg_proc WHERE proname LIKE 'sp_get_league_prediction".
> "\df sp_get_league_prediction" is also attached.
>
> Both functions are returning the same setof record:
>
> ---------------------------
> CREATE OR REPLACE FUNCTION sp_get_league_prediction(IN _id bigint, IN _rank
> integer, IN _log_in_expectence double precision, IN _feathers_gained
> integer, IN _tokens_all integer, IN _tokens_active integer, IN _score
> integer)
> RETURNS SETOF record AS
> $BODY$
> ...
> ---------------------------
> CREATE OR REPLACE FUNCTION sp_get_league_prediction(_id bigint, _rank
> integer, _log_in_expectence double precision, _feathers_gained integer,
> _tokens_all integer, _tokens_active integer, _score integer)
> RETURNS SETOF record AS
> $BODY$
> ...
No. One of the functions was created with something like above. But the
other one takes no arguments, and *returns* a table with those columns.
Try "\ef sp_get_league_prediction()" to get a CREATE OR REPLACE FUNCTION
statement to recreate the latter; you will see that it looks something
like this:
CREATE OR REPLACE FUNCTION public.sp_get_league_prediction()
RETURNS TABLE(id bigint, _rank integer, _log_in_expectence double
precision, _feathers_gained integer, _tokens_all integer, _tokens_active
integer, _score integer)
AS ...
- Heikki
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: BUG #8168: duplicated function signature
2013-05-17 10:31 BUG #8168: duplicated function signature vladimir.jovanovic@aparteko.com
2013-05-17 14:11 ` Re: BUG #8168: duplicated function signature Heikki Linnakangas <hlinnakangas@vmware.com>
2013-05-17 15:53 ` Re: BUG #8168: duplicated function signature Vladimir Jovanovic <vladimir.jovanovic@aparteko.com>
2013-05-17 16:10 ` Re: BUG #8168: duplicated function signature Heikki Linnakangas <hlinnakangas@vmware.com>
@ 2013-05-17 16:25 ` Vladimir Jovanovic <vladimir.jovanovic@aparteko.com>
0 siblings, 0 replies; 6+ messages in thread
From: Vladimir Jovanovic @ 2013-05-17 16:25 UTC (permalink / raw)
To: Heikki Linnakangas <hlinnakangas@vmware.com>; +Cc: pgsql-bugs
It looks I knocked on the wrong address. This is obviously PgAdmin bug
which obviously not correctly showing procedures (as I sent previously) and
made me waste your time, sorry.
On Fri, May 17, 2013 at 6:10 PM, Heikki Linnakangas <hlinnakangas@vmware.com
> wrote:
> On 17.05.2013 18:53, Vladimir Jovanovic wrote:
>
>> Hi Heikki,
>>
>> Here you can find attached .csv semicolon separated made by :"SELECT *
>> FROM
>> pg_proc WHERE proname LIKE 'sp_get_league_prediction".
>> "\df sp_get_league_prediction" is also attached.
>>
>> Both functions are returning the same setof record:
>>
>> ---------------------------
>> CREATE OR REPLACE FUNCTION sp_get_league_prediction(IN _id bigint, IN
>> _rank
>> integer, IN _log_in_expectence double precision, IN _feathers_gained
>> integer, IN _tokens_all integer, IN _tokens_active integer, IN _score
>> integer)
>> RETURNS SETOF record AS
>> $BODY$
>> ...
>> ---------------------------
>> CREATE OR REPLACE FUNCTION sp_get_league_prediction(_id bigint, _rank
>> integer, _log_in_expectence double precision, _feathers_gained integer,
>> _tokens_all integer, _tokens_active integer, _score integer)
>> RETURNS SETOF record AS
>> $BODY$
>> ...
>>
>
> No. One of the functions was created with something like above. But the
> other one takes no arguments, and *returns* a table with those columns. Try
> "\ef sp_get_league_prediction()" to get a CREATE OR REPLACE FUNCTION
> statement to recreate the latter; you will see that it looks something like
> this:
>
> CREATE OR REPLACE FUNCTION public.sp_get_league_**prediction()
> RETURNS TABLE(id bigint, _rank integer, _log_in_expectence double
> precision, _feathers_gained integer, _tokens_all integer, _tokens_active
> integer, _score integer)
> AS ...
>
> - Heikki
>
--
*Vladimir Jovanović* <http://www.aparteko.com/;
http://www.aparteko.com
CELL: +381 64 211 79 79
OFFICE: + 381 11 314 86 38
E-MAIL: vladimir.jovanovic@aparteko.com
[image: Description: cid:image001.png@01CD3D1C.7D977930]
setting standards in social gaming development
Attachments:
image001.png (image/png, 3.6K) download
view image
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2013-05-17 16:25 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2013-05-17 10:31 BUG #8168: duplicated function signature vladimir.jovanovic@aparteko.com
2013-05-17 14:11 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2013-05-17 14:39 ` Tom Lane <tgl@sss.pgh.pa.us>
2013-05-17 15:53 ` Vladimir Jovanovic <vladimir.jovanovic@aparteko.com>
2013-05-17 16:10 ` Heikki Linnakangas <hlinnakangas@vmware.com>
2013-05-17 16:25 ` Vladimir Jovanovic <vladimir.jovanovic@aparteko.com>
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