| Commit message (Collapse) | Author | Age |
|
|
|
|
|
| |
When ecpg was rewritten to the new protocol version not all variable types
were corrected. This patch rewrites the code for these types to fix that. It
also fixes the documentation to correctly tell the status of array handling.
|
|
|
|
|
|
|
|
|
|
|
| |
Give passwords to each user created in support of an ECPG connection
test case. Use SET SESSION AUTHORIZATION, not a fresh connection, to
reduce privileges during a dblink test case.
To test against such a server, both the "make installcheck-world"
environment and the postmaster environment must provide the default
user's password; $PGPASSFILE is the principal way to do so. (The
postmaster environment needs it for dblink and postgres_fdw tests.)
|
|
|
|
|
|
|
| |
Commit 4318daecc959886d001a6e79c6ea853e8b1dfb4b broke it. The change in
sub-second precision at extreme dates is normal. The inconsistent
truncation vs. rounding is essentially a bug, albeit a longstanding one.
Back-patch to 8.4, like the causative commit.
|
|
|
|
| |
Report by Tom Lane
|
|
|
|
|
| |
This includes removing tabs after periods in C comments, which was
applied to back branches, so this change should not effect backpatching.
|
|
|
|
| |
Patches by Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Many server functions use the MAXDATELEN constant to size a buffer for
parsing or displaying a datetime value. It was much too small for the
longest possible interval output and slightly too small for certain
valid timestamp input, particularly input with a long timezone name.
The long input was rejected needlessly; the long output caused
interval_out() to overrun its buffer. ECPG's pgtypes library has a copy
of the vulnerable functions, which bore the same vulnerabilities along
with some of its own. In contrast to the server, certain long inputs
caused stack overflow rather than failing cleanly. Back-patch to 8.4
(all supported versions).
Reported by Daniel Schüssler, reviewed by Tom Lane.
Security: CVE-2014-0063
|
|
|
|
|
|
|
|
|
|
|
|
| |
Split the rather long ecpg_execute() function into ecpg_build_params(),
ecpg_autostart_transaction(), a smaller ecpg_execute() and
ecpg_process_output(). There is no user-visible change here, only code
reorganization to support future patches.
Author: Zoltán Böszörményi
Reviewed by Antonin Houska. Larger, older versions of this patch were
reviewed by Noah Misch and Michael Meskes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This splits ECPGdo() into ecpg_prologue(), ecpg_do() and
ecpg_epilogue(), and renames free_params() into ecpg_free_params() and
exports it. This makes it possible for future code to use these
routines for their own purposes.
There is no user-visible functionality change here, only code
reorganization.
Zoltán Böszörményi
Reviewed by Antonin Houska. Larger, older versions of this patch were
reviewed by Noah Misch and Michael Meskes.
|
| |
|
|
|
|
| |
commit.
|
|
|
|
|
|
|
|
| |
While working on most platforms the old way sometimes created alignment
problems. This should fix it. Also the regresion tests were updated to test for
the reported case.
Report and fix by MauMau <maumau307@gmail.com>
|
|
|
|
| |
Patch by Boszormenyi Zoltan <zb@cybertec.at>
|
|
|
|
|
|
| |
Valgrind runs.
Patch by Boszormenyi Zoltan <zb@cybertec.at>
|
|
|
|
|
| |
Set per file type attributes in .gitattributes to fine-tune whitespace
checks. With the associated cleanups, the tree is now clean for git
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
asprintf(), aside from not being particularly portable, has a fundamentally
badly-designed API; the psprintf() function that was added in passing in
the previous patch has a much better API choice. Moreover, the NetBSD
implementation that was borrowed for the previous patch doesn't work with
non-C99-compliant vsnprintf, which is something we still have to cope with
on some platforms; and it depends on va_copy which isn't all that portable
either. Get rid of that code in favor of an implementation similar to what
we've used for many years in stringinfo.c. Also, move it into libpgcommon
since it's not really libpgport material.
I think this patch will be enough to turn the buildfarm green again, but
there's still cosmetic work left to do, namely get rid of pg_asprintf()
in favor of using psprintf(). That will come in a followon patch.
|
|
|
|
|
|
|
|
|
| |
Add asprintf(), pg_asprintf(), and psprintf() to simplify string
allocation and composition. Replacement implementations taken from
NetBSD.
Reviewed-by: Álvaro Herrera <alvherre@2ndquadrant.com>
Reviewed-by: Asif Naeem <anaeem.it@gmail.com>
|
| |
|
|
|
|
|
| |
There are cases where the day of year value in struct tm is used, but it never
got calculated. Problem found by Coverity scan.
|
| |
|
|
|
|
| |
With a unique counter being added anyway, there is no need anymore to have the variable name listed, too.
|
| |
|
|
|
|
| |
suite for ecpg.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent releases had a check on rel->rd_refcnt in heap_drop_with_catalog,
but failed to cover the possibility of pending trigger events at DROP time.
(Before 8.4 we didn't even check the refcnt.) When the trigger events were
eventually fired, you'd get "could not open relation with OID nnn" errors,
as in recent report from strk. Better to throw a suitable error when the
DROP is attempted.
Also add a similar check in DROP INDEX.
Back-patch to all supported branches.
|
|
|
|
| |
array dimension.
|
| |
|
| |
|
|
|
|
| |
at end of files.
|
| |
|
|
|
|
| |
Per buildfarm, again.
|
| |
|
|
|
|
|
|
|
| |
While the values were correctly returned they were not moved into C variables
as they should be.
Closes: #5489
|
|
|
|
| |
ecpglib.
|
|
|
|
|
| |
commandline option "-i". This change fixes this and adds a test case. It also
honors #include_next, although this is probably never used for embedded SQL.
|
|
|
|
| |
these definitions unique, too. It used to use the linenumber but in the rare case of two definitions in one line this was not unique.
|
|
|
|
| |
error sqlstate. This change makes it return a correct value..
|
| |
|
|
|
|
| |
By Zoltán Böszörményi
|
|
|
|
| |
just trying to figure out the minimal amount of defines needed.
|
|
|
|
| |
<float.h>' as well.
|
|
|
|
| |
fixing yet another incorrect log output.
|
|
|
|
|
|
| |
test failures on some architectures.
By Zoltán Böszörményi.
|
|
|
|
|
|
| |
making it OS independant.
Patch done by Zoltán Böszörményi.
|
|
|
|
|
|
|
|
| |
order
so regression testing is possible,
by Zoltan Boszormenyi
|
|
|
|
| |
of my commit.
|
|
|
|
| |
cursor support to native mode.
|
|
|
|
| |
auto-prepare mode if the connection is closed and re-opened and the previously prepared query is issued again.
|
|
|
|
| |
[OUTPUT] statement to ecpg.
|