pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #13905: Inconsistent code modification
2+ messages / 2 participants
[nested] [flat]

* BUG #13905: Inconsistent code modification
@ 2016-02-02 07:47 petrum@gmail.com
  2016-02-02 16:18 ` Re: BUG #13905: Inconsistent code modification Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: petrum@gmail.com @ 2016-02-02 07:47 UTC (permalink / raw)
  To: pgsql-bugs

The following bug has been logged on the website:

Bug reference:      13905
Logged by:          Petru Florin Mihancea
Email address:      petrum@gmail.com
PostgreSQL version: 9.4.4
Operating system:   MacOSX
Description:        

While experimenting with a CodeSonar plugin I am working on I identified the
following potential low severity bug.

Location: file src/include/catalog/pg_proc.h

Lines 4613 and 4615 looks to be copies of lines 4252 and 4254,
respectively.
They are parts of a larger code fragment duplicated and modified by
replacing *json* with *jsonb*. However, lines 4613 and 4615 are not modified
accordingly i.e., they still contain the *json* sub-string and not the
*jsonb* as it would be expected according to their neighbor source code
lines.


-- 
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] 2+ messages in thread

* Re: BUG #13905: Inconsistent code modification
  2016-02-02 07:47 BUG #13905: Inconsistent code modification petrum@gmail.com
@ 2016-02-02 16:18 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2016-02-02 16:18 UTC (permalink / raw)
  To: petrum@gmail.com; +Cc: pgsql-bugs

petrum@gmail.com writes:
> Location: file src/include/catalog/pg_proc.h
> Lines 4613 and 4615 looks to be copies of lines 4252 and 4254,
> respectively.

It's generally better to show the actual lines you're talking about;
line numbers tend to not be all that stable.  But I guess you are talking
about the DESCR lines for jsonb_to_record() and jsonb_to_recordset()?

> They are parts of a larger code fragment duplicated and modified by
> replacing *json* with *jsonb*. However, lines 4613 and 4615 are not modified
> accordingly i.e., they still contain the *json* sub-string and not the
> *jsonb* as it would be expected according to their neighbor source code
> lines.

Hmm, yeah.  You could argue it either way perhaps as to whether these
comments should refer to JSON or the specific type name, but since all
the other jsonb functions do the latter, these should too.

Thanks for noticing!

			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] 2+ messages in thread


end of thread, other threads:[~2016-02-02 16:18 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-02-02 07:47 BUG #13905: Inconsistent code modification petrum@gmail.com
2016-02-02 16:18 ` Tom Lane <tgl@sss.pgh.pa.us>

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