| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
as elog format strings. Hai-Chen Tu pointed out the problem in
contrib/dbmirror, but it wasn't the only such error.
|
|
|
|
|
|
|
| |
SPI_prepare: they all save the prepared plan into topCxt, and so the
procCxt copy that's actually returned by SPI_prepare ought to be freed.
Diagnosis and plpython fix by Nigel Andrews, followup for other PLs
by Tom Lane.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1) pltcl:
Add SPI_freetuptable() calls to avoid memory leaks (Me + Neil Conway)
Change sprintf()s to snprintf()s (Neil Conway)
Remove header files included elsewhere (Neil Conway)
2)plpython:
Add SPI_freetuptable() calls to avoid memory leaks
Cosemtic change to remove a compiler warning
Notes:
I have tested pltcl.c for
a) the original leak problem reported for the repeated call of spi_exec
in a TCL fragment
and
b) the subsequent report resulting from the use of spi_exec -array
in a TCL
fragment.
The plpython.c patch is exactly the same as that applied to make
revision 1.23,
the plpython_schema.sql and feature.expected sections of the patch are
also the
same as last submited, applied and subsequently reversed out. It remains
untested by me (other than via make check). However, this should be safe
provided PyString_FromString() _copies_ the given string to make a
PyObject.
Nigel J. Andrews
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
let's say this patch superscedes the previous one.
I have also attached a patch addressing the similar memory leak problem in
plpython. This includes a slight adjustment of the tests in the source
directory. The patch also includes a cosmetic change to remove a compiler
warning although I think the change makes the code look worse though.
BTW, by my reckoning the memory leak would occur with prepared plans and
without. If that is not the case then I've been barking up the wrong tree.
Nigel J. Andrews
|
|
|
|
|
|
|
|
| |
with OPAQUE. CREATE LANGUAGE, CREATE TRIGGER, and CREATE TYPE will all
accept references to functions declared with OPAQUE --- but they will
issue a NOTICE, and will modify the function entries in pg_proc to have
the preferred type-safe argument or result types instead of OPAQUE.
Per recent pghackers discussions.
|
| |
|
|
|
|
|
|
| |
with OPAQUE, as per recent pghackers discussion. I still want to do some
more work on the 'cstring' pseudo-type, but I'm going to commit the bulk
of the changes now before the tree starts shifting under me ...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bitmap, if present).
Per Tom Lane's suggestion the information whether a tuple has an oid
or not is carried in the tuple descriptor. For debugging reasons
tdhasoid is of type char, not bool. There are predefined values for
WITHOID, WITHOUTOID and UNDEFOID.
This patch has been generated against a cvs snapshot from last week
and I don't expect it to apply cleanly to current sources. While I
post it here for public review, I'm working on a new version against a
current snapshot. (There's been heavy activity recently; hope to
catch up some day ...)
This is a long patch; if it is too hard to swallow, I can provide it
in smaller pieces:
Part 1: Accessor macros
Part 2: tdhasoid in TupDesc
Part 3: Regression test
Part 4: Parameter withoid to heap_addheader
Part 5: Eliminate t_oid from HeapTupleHeader
Part 2 is the most hairy part because of changes in the executor and
even in the parser; the other parts are straightforward.
Up to part 4 the patched postmaster stays binary compatible to
databases created with an unpatched version. Part 5 is small (100
lines) and finally breaks compatibility.
Manfred Koizar
|
| |
|
|
|
|
| |
changed since CREATE CONVERSION supported.
|
|
|
|
|
|
|
|
|
|
|
| |
HeapTupleHeaderData in setter and getter macros called
HeapTupleHeaderGetXmin, HeapTupleHeaderSetXmin etc.
It also introduces a "virtual" field xvac by defining
HeapTupleHeaderGetXvac and HeapTupleHeaderSetXvac. Xvac is used by
VACUUM, in fact it is stored in t_cmin.
Manfred Koizar
|
| |
|
|
|
|
| |
wasn't seen before, maybe the Tcl compiler flags were less strict.
|
|
|
|
|
|
| |
in different namespaces. Also, cleanup work on relation namespace
support: drop, alter, rename commands work for tables in non-default
namespaces.
|
|
|
|
| |
still needed because only removed in 7.4.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Change all current CVS messages of NOTICE to WARNING. We were going
to do this just before 7.3 beta but it has to be done now, as you will
see below.
o Change current INFO messages that should be controlled by
client_min_messages to NOTICE.
o Force remaining INFO messages, like from EXPLAIN, VACUUM VERBOSE, etc.
to always go to the client.
o Remove INFO from the client_min_messages options and add NOTICE.
Seems we do need three non-ERROR elog levels to handle the various
behaviors we need for these messages.
Regression passed.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
now just below FATAL in server_min_messages. Added more text to
highlight ordering difference between it and client_min_messages.
---------------------------------------------------------------------------
REALLYFATAL => PANIC
STOP => PANIC
New INFO level the prints to client by default
New LOG level the prints to server log by default
Cause VACUUM information to print only to the client
NOTICE => INFO where purely information messages are sent
DEBUG => LOG for purely server status messages
DEBUG removed, kept as backward compatible
DEBUG5, DEBUG4, DEBUG3, DEBUG2, DEBUG1 added
DebugLvl removed in favor of new DEBUG[1-5] symbols
New server_min_messages GUC parameter with values:
DEBUG[5-1], INFO, NOTICE, ERROR, LOG, FATAL, PANIC
New client_min_messages GUC parameter with values:
DEBUG[5-1], LOG, INFO, NOTICE, ERROR, FATAL, PANIC
Server startup now logged with LOG instead of DEBUG
Remove debug_level GUC parameter
elog() numbers now start at 10
Add test to print error message if older elog() values are passed to elog()
Bootstrap mode now has a -d that requires an argument, like postmaster
|
|
|
|
|
| |
It would try to call the input conversion routines for them anyway.
So, a valid input string for the datatype had to be supplied.
|
|
|
|
| |
initdb/regression tests pass.
|
|
|
|
| |
tests pass.
|
|
|
|
| |
back when only varlena types paid any attention to typmod ...
|
|
|
|
| |
CREATE OR REPLACE FUNCTION.
|
|
|
|
|
|
|
|
| |
Enabling this feature adds very light overhead of 1 select from pg_class on
first using of pl/tcl in backend if unknown suppport is really unused.
But pl/tcl with this support has very improved functionality.
Patch includes changes to documentation.
|
|
|
|
|
|
|
|
|
| |
lookup info in the relcache for index access method support functions.
This makes a huge difference for dynamically loaded support functions,
and should save a few cycles even for built-in ones. Also tweak dfmgr.c
so that load_external_function is called only once, not twice, when
doing fmgr_info for a dynamically loaded function. All per performance
gripe from Teodor Sigaev, 5-Oct-01.
|
|
|
|
| |
Vsevolod Lobko
|
|
|
|
|
|
|
|
|
| |
which contains stack trace.
One problem, after this patch errors will generate multiline ERROR
messages. Is it acceptable or do I need split it and generate multiple
singleline messages?
Vsevolod Lobko
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
> > > > > and --enable-unicode-convertion if it ought to work correctly
> > > > > with Tcl/Tk >= 8.1 (client or server side).
> > > > >
> > > > > - PL/Tcl needs to be changed to use pg_do_encoding_conversion
> > > > > if it runs on a Tcl version >= 8.1 .
> > >
> > > > I'll do pl/tcl part in the next version of patch. Using this approach we
> > > > can eliminate overhead for databases in UNICODE.
> > >
> > > Any progress on this? I'd prefer to get rid of this --enable-pltcl-utf
> > > option before release.
> >
> > Done
> >
> > Next version removes --enable-pltcl-utf switch and enables embedded
> > utf conversion of pgsql if tcl version >=8.1 and --enable-unicode-conversion
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now with documentation update and disabling of UTF conversion for Tcl <=8.0
On Fri, 24 Aug 2001, Vsevolod Lobko wrote:
> On Thu, 23 Aug 2001, Tom Lane wrote:
>
> > > Is this looks better?
> >
> > It does, but one small gripe: the lack of semicolons will probably cause
> > pg_indent to mess up the indentation. (I know emacs' autoindent mode
> > will not work nicely with it, either.) Please set up the macros so that
> > you write
> >
> > UTF_BEGIN;
> > Tcl_DStringAppend(&unknown_src, UTF_E2U(part), -1);
> > UTF_END;
> >
> > and then I'll be happy.
>
> Attached revised patch
>
> > Your point about overhead is a good one, so I retract the gripe about
> > using a configure switch. But please include documentation patches to
> > describe the configure option in the administrator's guide (installation
> > section).
>
> This patch still uses configure switch for enabling feature.
>
> For enabling based on tcl version we have 2 posibilites:
> 1) having feature enabled by default, but in pltcl.c check for tcl
> version and disable it for old versions
> 2) enable or disable at configure time based on tcl version, but there
> are problem - current configure don't checks for tcl version at all
> and my configure skills not enought for adding this
>
Vsevolod Lobko
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
does.. I started using pltcl a lot because I like to decide when and how my queries get planned.. so I put one together really quick
Sorry I don't have the original around to make a quick diff, but its a very small change... I think this should be in the next release, there's no reason not to have it.
its a function with no expected arguments, so you can use it like:
spi_exec "INSERT INTO mytable(columns...) VALUES(values..)"
set oid [spi_lastoid]
spi_exec "SELECT mytable_id from mytable WHERE oid=$oid"
It just didn't make sense for me to use plpgsql and pltcl, or just screw
them both and use SPI from C.
bob@redivi.com
|
| |
|
|
|
|
|
|
|
|
| |
in plpgsql: they fail for datatypes that have old-style I/O functions
due to caching FmgrInfo structs with wrong fn_mcxt lifetime.
Although the plpython fix seems straightforward, I can't check it here
since I don't have Python installed --- would someone check it?
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
One more :)) It's for improper function argumets for
PLTCL_UNKNOWN_SUPPORT code
I'm not an autoconf expert, but is it possible to enable unknown
support in pltcl with configure option ?
This support is really handy for real life usage of pl/tcl.
seva@sevasoft.kiev.ua
|
|
|
|
|
|
|
| |
if the return datatype's input converter was at all strict, because the
converter would get called on junk data when returning NULL. Also
ensure that it gives an error rather than coredumping if someone tries
to use it in a trigger function.
|
|
|
|
| |
or return type.
|
|
|
|
|
|
|
|
|
| |
in pghackers list. Support for oldstyle internal functions is gone
(no longer needed, since conversion is complete) and pg_language entry
'internal' now implies newstyle call convention. pg_language entry
'newC' is gone; both old and newstyle dynamically loaded C functions
are now called language 'C'. A newstyle function must be identified
by an associated info routine. See src/backend/utils/fmgr/README.
|
|
|
|
|
|
|
| |
maintained for each cache entry. A cache entry will not be freed until
the matching ReleaseSysCache call has been executed. This eliminates
worries about cache entries getting dropped while still in use. See
my posting to pg-hackers of even date for more info.
|
|
|
|
|
|
|
|
|
|
| |
in a non-safe interpreter, so with full OS access! Language is
restricted to be used by DB superusers.
Added "argisnull n" and "return_null" commands to gain full control
over NULL values from new FMGR capabilities.
Jan
|
|
|
|
|
| |
one of updating the whole text datatype, but there are so dang many
calls of these two routines that it seems worth a separate commit.
|
|
|
|
|
|
|
| |
inputs have been converted to newstyle. This should go a long way towards
fixing our portability problems with platforms where char and short
parameters are passed differently from int-width parameters. Still
more to do for the Alpha port however.
|
|
|
|
|
| |
fmgr_faddr() in favor of new-style calls. Lots of cleanup of
sloppy casts to use XXXGetDatum and DatumGetXXX ...
|
|
|
|
| |
CurrentTriggerData is history.
|
|
|
|
|
|
|
| |
key call sites are changed, but most called functions are still oldstyle.
An exception is that the PL managers are updated (so, for example, NULL
handling now behaves as expected in plperl and plpgsql functions).
NOTE initdb is forced due to added column in pg_proc.
|
| |
|
|
|
|
| |
print OIDs as %u not %d.
|
| |
|
|
|
|
|
| |
Shouldn't create any portability problems, since we have a configure
test to #define away volatile if the compiler doesn't support it.
|
|
|
|
|
|
|
| |
functions, which would lead to trouble with datatypes that paid attention
to the typelem or typmod parameters to these functions. In particular,
incorrect code in pg_aggregate.c explains the platform-specific failures
that have been reported in NUMERIC avg().
|