- Jun 11, 2009
-
-
Bruce Momjian authored
provided by Andrew.
-
- Jun 10, 2009
-
-
Tom Lane authored
Sergey Burladyan, there are at least some dank corners of libxml2 that assume this behavior, even though their published documentation suggests they shouldn't. This is only really a live problem in 8.3, but the code is still there for possible debugging use in HEAD, so patch both branches.
-
Peter Eisentraut authored
Author: Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>
-
- Jun 08, 2009
-
-
Peter Eisentraut authored
also backpatched to 8.3
-
- May 13, 2009
-
-
Tom Lane authored
redirecting libxml's allocations into a Postgres context. Instead, just let it use malloc directly, and add PG_TRY blocks as needed to be sure we release libxml data structures in error recovery code paths. This is ugly but seems much more likely to play nicely with third-party uses of libxml, as seen in recent trouble reports about using Perl XML facilities in pl/perl and bug #4774 about contrib/xml2. I left the code for allocation redirection in place, but it's only built/used if you #define USE_LIBXMLCONTEXT. This is because I found it useful to corral libxml's allocations in a palloc context when hunting for libxml memory leaks, and we're surely going to have more of those in the future with this type of approach. But we don't want it turned on in a normal build because it breaks exactly what we need to fix. I have not re-indented most of the code sections that are now wrapped by PG_TRY(); that's for ease of review. pg_indent will fix it. This is a pre-existing bug in 8.3, but I don't dare back-patch this change until it's gotten a reasonable amount of field testing.
-
- May 12, 2009
-
-
Tom Lane authored
xml_parse, all arising from the same sloppy usage of parse_xml_decl. The original coding had that function returning its output string parameters in the libxml context, which is long-lived, and all but one of its callers neglected to free the strings afterwards. The easiest and most bulletproof fix is to return the strings in the local palloc context instead, since that's short-lived. This was only costing a dozen or two bytes per function call, but that adds up fast if the function is called repeatedly ... Noted while poking at the more general problem of what to do with our libxml memory allocation hooks. Back-patch to 8.3, which has the identical coding.
-
- Apr 08, 2009
-
-
Peter Eisentraut authored
map_sql_value_to_xml_value() instead of directly through the data type output function. This is per SQL standard, and consistent with XMLELEMENT().
-
- Mar 27, 2009
-
-
Tom Lane authored
while converting to XML. Bernd Helmle
-
- Mar 23, 2009
-
-
Andrew Dunstan authored
-
- Jan 07, 2009
-
-
Tom Lane authored
not include postgres.h nor anything else it doesn't directly need. Add #includes to calling files as needed to compensate. Per my proposal of yesterday. This should be noted as a source code change in the 8.4 release notes, since it's likely to require changes in add-on modules.
-
- Jan 01, 2009
-
-
Bruce Momjian authored
-
- Nov 10, 2008
-
-
Tom Lane authored
the length of a UTF8 character with pg_mblen (wrong if DB encoding isn't UTF8), and the latter was blithely assuming that a static buffer would somehow revert to all zeroes for each use.
-
- Oct 29, 2008
-
-
Peter Eisentraut authored
-
- Oct 14, 2008
-
-
Tom Lane authored
the timestamp types. Turns out this doesn't even reduce the available range of dates, since the restriction to dates that work for Julian-date arithmetic is much tighter than the int32 range anyway. Per a longstanding TODO item.
-
- Oct 09, 2008
-
-
Tom Lane authored
Report and fix by Michael McMaster. Some minor code beautification by me, also avoid memory leaks in the special-case paths.
-
- Sep 16, 2008
-
-
Tom Lane authored
-
- Aug 26, 2008
-
-
Tom Lane authored
into nodes/nodeFuncs, so as to reduce wanton cross-subsystem #includes inside the backend. There's probably more that should be done along this line, but this is a start anyway.
-
- Jul 03, 2008
-
-
Tom Lane authored
fix by Kris Jurka.
-
- May 12, 2008
-
-
Alvaro Herrera authored
unnecessary #include lines in it. Also, move some tuple routine prototypes and macros to htup.h, which allows removal of heapam.h inclusion from some .c files. For this to work, a new header file access/sysattr.h needed to be created, initially containing attribute numbers of system columns, for pg_dump usage. While at it, make contrib ltree, intarray and hstore header files more consistent with our header style.
-
- May 04, 2008
-
-
Tom Lane authored
These changes assume that the varchar and xml data types are represented the same as text. (I did not, however, accept the portions of the proposed patch that wanted to assume bytea is the same as text --- tgl.) Brendan Jurd
-
- Apr 04, 2008
-
-
Magnus Hagander authored
xmloption GUC variables into enums..
-
- Mar 25, 2008
-
-
Tom Lane authored
strings. This patch introduces four support functions cstring_to_text, cstring_to_text_with_len, text_to_cstring, and text_to_cstring_buffer, and two macros CStringGetTextDatum and TextDatumGetCString. A number of existing macros that provided variants on these themes were removed. Most of the places that need to make such conversions now require just one function or macro call, in place of the multiple notational layers that used to be needed. There are no longer any direct calls of textout or textin, and we got most of the places that were using handmade conversions via memcpy (there may be a few still lurking, though). This commit doesn't make any serious effort to eliminate transient memory leaks caused by detoasting toasted text objects before they reach text_to_cstring. We changed PG_GETARG_TEXT_P to PG_GETARG_TEXT_PP in a few places where it was easy, but much more could be done. Brendan Jurd and Tom Lane
-
- Mar 24, 2008
-
-
Tom Lane authored
friends. Avoid double translation of some messages, ensure other messages are exposed for translation (and make them follow the style guidelines), avoid unsafe passing of an unpredictable message text as a format string.
-
- Mar 01, 2008
-
-
Tom Lane authored
left in the code though it was not meant to be provided. It represents a security hole because unprivileged users could use it to look at (at least the first line of) any file readable by the backend. Fortunately, this is only possible if the backend was built with XML support, so the damage is at least mitigated; and 8.3 probably hasn't propagated into any security-critical uses yet anyway. Per report from Sergey Burladyan.
-
- Jan 15, 2008
-
-
Tom Lane authored
in whichever context happens to be current during a call of an xml.c function, use a dedicated context that will not go away until we explicitly delete it (which we do at transaction end or subtransaction abort). This makes recovery after an error much simpler --- we don't have to individually delete the data structures created by libxml. Also, we need to initialize and cleanup libxml only once per transaction (if there's no error) instead of once per function call, so it should be a bit faster. We'll need to keep an eye out for intra-transaction memory leaks, though. Alvaro and Tom.
-
- Jan 12, 2008
-
-
Tom Lane authored
Therefore we must xmlCleanupParser(), or we risk leaving behind dangling pointers to whatever memory context is current when xml_init() is called. This seems to fix bug #3860, though we might still want the more invasive solution being worked on by Alvaro.
-
Neil Conway authored
SPI_prepare() and SPI_cursor_open(), to silence a Coverity warning.
-
Neil Conway authored
anyway, it is faster to memcpy() than to strcpy().
-
- Jan 01, 2008
-
-
Bruce Momjian authored
-
- Nov 28, 2007
-
-
Peter Eisentraut authored
-
- Nov 27, 2007
-
-
Tom Lane authored
-
Peter Eisentraut authored
immutable and indexable. Also fix the volatility settings of some other XML-related functions.
-
- Nov 25, 2007
-
-
Peter Eisentraut authored
-
- Nov 21, 2007
-
-
Tom Lane authored
happened to be right up against the end of memory, per report from Matt Magoffin. While at it, avoid useless multiple copying of string by not depending on xmlStrncatNew.
-
- Nov 15, 2007
-
-
Bruce Momjian authored
avoid this problem in the future.)
-
Bruce Momjian authored
-
- Nov 10, 2007
- Nov 09, 2007
-
-
Peter Eisentraut authored
those being exactly "xml". Bug #3735 from Ben Leslie
-
- Nov 08, 2007
-
-
Peter Eisentraut authored
-