Skip site navigation (1) Skip section navigation (2)

pgsql: Some code review for xml.c: Add some more xml_init() calls that

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Some code review for xml.c: Add some more xml_init() calls that
Date: 2007-11-06 03:06:28
Message-ID: 20071106030628.D33EC754229@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Some code review for xml.c:
Add some more xml_init() calls that might not be necessary, but seem like a
good idea to avoid possible problems like we saw in xmlelement().
Fix unsafe assumption that you can keep using the tupledesc of a relcache
entry you don't have open.
Add missing error checks for SearchSysCache failure.
Get rid of handwritten array traversal in xpath() and O(N^2), broken-for-nulls
array access code in map_sql_value_to_xml_value(), in favor of using
deconstruct_array.
Manually adjust a lot of line breaks in places where the code is otherwise
gonna look pretty awful after pg_indent hacks it up (original author seems to
have liked to lay out code for a 200-column window).

Modified Files:
--------------
    pgsql/src/backend/utils/adt:
        xml.c (r1.50 -> r1.51)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/adt/xml.c?r1=1.50&r2=1.51)

pgsql-committers by date

Next:From: Michael MeskesDate: 2007-11-06 08:32:08
Subject: pgsql: Fixed two parser bugs.
Previous:From: Tom LaneDate: 2007-11-05 22:23:07
Subject: pgsql: Fix xmlelement() to initialize libxml correctly before using it,

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group