pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #14186: Inconsistent code modification
2+ messages / 2 participants
[nested] [flat]
* BUG #14186: Inconsistent code modification
@ 2016-06-13 16:31 petrum@gmail.com
2016-06-13 17:20 ` Re: BUG #14186: Inconsistent code modification Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: petrum@gmail.com @ 2016-06-13 16:31 UTC (permalink / raw)
To: pgsql-bugs
The following bug has been logged on the website:
Bug reference: 14186
Logged by: Petru-Florin Mihancea
Email address: petrum@gmail.com
PostgreSQL version: 9.4.4
Operating system: Macosx
Description:
File: postgresql-9.4.4/src/backend/catalog/aclchk.c
Function: pg_type_aclmask (line 4200)
At lines 4236, I think elttype_oid should be used and not type_oid. The code
is bellow:
tuple = SearchSysCache1(TYPEOID, ObjectIdGetDatum(elttype_oid));
if (!HeapTupleIsValid(tuple))
ereport(ERROR,
(errmsg("type with OID %u does not
exist",
type_oid))); <<<
POTENTIAL PROBLEM
It is searched for elttype_oid and thus elttype_oid should probably be
reported that is not found. Before this fragment, a similar search is done
for type_oid and type_oid is reported as not found (lines 4218-4222 but not
copied here). Flowing the same idea, elttype_oid should be used in the
presented case. I found this issue using a CodeSonar plugin I develop.
Regards,
Pepi
--
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 #14186: Inconsistent code modification
2016-06-13 16:31 BUG #14186: Inconsistent code modification petrum@gmail.com
@ 2016-06-13 17:20 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2016-06-13 17:20 UTC (permalink / raw)
To: petrum@gmail.com; +Cc: pgsql-bugs
petrum@gmail.com writes:
> File: postgresql-9.4.4/src/backend/catalog/aclchk.c
> Function: pg_type_aclmask (line 4200)
> At lines 4236, I think elttype_oid should be used and not type_oid.
Yeah, you're right. Will fix, thanks for the report!
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-06-13 17:20 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-06-13 16:31 BUG #14186: Inconsistent code modification petrum@gmail.com
2016-06-13 17:20 ` 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