Commit Graph

1151 Commits

Author SHA1 Message Date
Michael Meskes
fc8115d42f Cleaned up va_list handling. Hopefully this now works on all archs. 2007-02-02 08:58:23 +00:00
Bruce Momjian
8b4ff8b6a1 Wording cleanup for error messages. Also change can't -> cannot.
Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".
2007-02-01 19:10:30 +00:00
Michael Meskes
0fe1c36757 Fixed expected files, so they are in sync with tests again. 2007-01-27 18:33:22 +00:00
Michael Meskes
a5a1506c96 Removed compiler warning due to unneeded unsigned declaration.
Removed regression test that triggers those libc precision bugs on some archs.
2007-01-25 16:45:25 +00:00
Peter Eisentraut
a85e9c61e5 Remove some unused variables 2007-01-21 09:23:29 +00:00
Peter Eisentraut
962e825cd7 Put back libpq link, but make sure that libpq's in-tree directory is
mentioned before the system directories.
2007-01-21 09:19:06 +00:00
Peter Eisentraut
2cc01004c6 Remove remains of old depend target. 2007-01-20 17:16:17 +00:00
Peter Eisentraut
552348c166 The libpq library directory was mentioned here in the wrong place, which
might lead to a previously installed libpq being used instead.  But we
don't actually have to link with libpq here at all, so remove it.
2007-01-20 15:26:28 +00:00
Peter Eisentraut
862c3ff04d Only build ecpg test code when the test is to be performed, in line with
other test code.
2007-01-20 15:25:29 +00:00
Michael Meskes
1b1c6ed70a Missed two new files from Joachim's patch. 2007-01-12 11:31:33 +00:00
Michael Meskes
89dad03f8b also adjust MinGW expected file to new setup
create expected file with correct port number
2007-01-12 11:27:28 +00:00
Michael Meskes
b8f611cf4b Simplified regression handling
Added patch by Joachim to work around OpenBSD bug in regression suite.
2007-01-12 10:00:14 +00:00
Michael Meskes
5b88b85cad Applied Joachim's patch for a --regression option.
Made this option mark the .c files, so the environment variable is no longer needed.
Created a special MinGW file with the special error message.
Do not print port into log file when running regression tests.
2007-01-11 15:47:34 +00:00
Bruce Momjian
9b1854f16e Update ecpg regresison output for new library version number. 2007-01-05 22:43:17 +00:00
Bruce Momjian
29dccf5fe0 Update CVS HEAD for 2007 copyright. Back branches are typically not
back-stamped for this.
2007-01-05 22:20:05 +00:00
Bruce Momjian
1c3b43cddd Stamp major release 8.3.0, and increment library version numbers. 2007-01-05 20:54:43 +00:00
Alvaro Herrera
cf06c2e5d4 Fix Makefile problem which prevented installation on VPATH builds. 2006-11-29 21:21:03 +00:00
Michael Meskes
09309df9a2 Also install ecpg_config.h 2006-11-28 12:44:06 +00:00
Tom Lane
ce3d1a4fbc Un-break ecpg regression test. 2006-11-23 05:47:48 +00:00
Bruce Momjian
956c2d6683 Make ecpg test variable 'times' static so as not to conflict with libc
symbol.
2006-11-23 04:38:01 +00:00
Michael Meskes
0c96e42797 Applied patch by Peter Harris to free auto_mem structure on connect 2006-11-08 10:46:47 +00:00
Michael Meskes
a09f9ff649 Small parser sync 2006-10-23 08:00:48 +00:00
Tom Lane
14914e0d33 Fix unexpected side-effect of changes for case insensitivity of timezone names. 2006-10-17 02:21:46 +00:00
Michael Meskes
fcc2fbac22 Reverted changes made by pgindent
Made show.pgc set all variables before displaying them.
2006-10-04 10:09:03 +00:00
Bruce Momjian
f99a569a2e pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
Tom Lane
062421defb Fix a couple other places that need to know about (some) src/port/ files
explicitly.
2006-09-28 14:48:45 +00:00
Michael Meskes
2c660c61cf Added new files 2006-09-26 09:07:31 +00:00
Michael Meskes
9897e35c56 Added Joachim's changes for MinGW.
Added SET DATESTYLE to one test so the output format is defined.
2006-09-26 07:56:57 +00:00
Tom Lane
beca984e5f Fix bugs in plpgsql and ecpg caused by assuming that isspace() would only
return true for exactly the characters treated as whitespace by their flex
scanners.  Per report from Victor Snezhko and subsequent investigation.

Also fix a passel of unsafe usages of <ctype.h> functions, that is, ye olde
char-vs-unsigned-char issue.  I won't miss <ctype.h> when we are finally
able to stop using it.
2006-09-22 21:39:58 +00:00
Tom Lane
9b5e108ee9 Fix shared library creation to work properly on AIX. Albe Laurenz 2006-09-19 15:36:08 +00:00
Michael Meskes
4eef745fb1 Cygwin systems seem to have a different error message when trying to connect to port 0. Let's try port 20 instead. 2006-09-14 08:46:58 +00:00
Michael Meskes
0f0d6765ce Added missing constuctor/destructor for interval and date. 2006-09-14 08:02:38 +00:00
Michael Meskes
9c356a6b3e Seems this wasn't committed originally 2006-09-12 09:09:31 +00:00
Tom Lane
568b80168f Move set_pglocale_pgservice() from path.c to exec.c, so that pulling in
path.c does not in itself force linking of both exec.c and libintl.
Should fix current ecpglib build failure on pickier platforms.
2006-09-11 20:10:30 +00:00
Tom Lane
bb87c7b551 Ooops, forgot to update ecpg comparison files to match
source-code change.
2006-09-11 02:50:07 +00:00
Tom Lane
1d0b7e71e3 Fix unportable usage complained of by icc. Per buildfarm results. 2006-09-11 01:41:35 +00:00
Tom Lane
4ee24cbb55 Install a cleaner solution to the AIX libpq linking problem, as per
an earlier discussion.  Centralize assumptions about what libpq depends
on in one place in Makefile.global.  I am unconvinced that this list
is complete, but since ecpg seems to have gotten along with just these
entries, we'll try it this way and see what happens.
2006-09-10 22:07:02 +00:00
Michael Meskes
0b33c56297 Not all C compilers understand the "//" comment in this test case, so I removed it. 2006-09-08 14:58:27 +00:00
Michael Meskes
460f46816a Replaced complex tests with small ones. 2006-09-08 13:32:29 +00:00
Michael Meskes
52a013bea8 More logic from complex/test* moved to their own testcases. 2006-09-08 09:03:40 +00:00
Michael Meskes
803d9c39dd Changing a test case also changes the output that is expected.
Float/Long aliasing doesn't work on all architecures.
2006-09-07 11:18:47 +00:00
Michael Meskes
1d1868d97e Removed one output because integer/double usage differ 2006-09-07 08:15:58 +00:00
Michael Meskes
a3242fb42c Lost some changes yet again 2006-09-05 12:17:09 +00:00
Michael Meskes
c9970d5948 Started to cleanup complex tests.
Added some interval checks to regression suite.
2006-09-05 12:11:03 +00:00
Michael Meskes
276b3bb3e3 Synced parser.
Fixed ecpglib trying to read one character after end-of-string.
Fixed port number setting in regression suite.
2006-09-05 10:00:53 +00:00
Bruce Momjian
497f49a736 Remove trailing slash use in ecpg regression script; caused failures on
some platforms.
2006-09-04 19:36:21 +00:00
Tom Lane
57bfb27e60 Fix interval input parser so that fractional weeks and months are
cascaded first to days and only what is leftover into seconds.  This
seems to satisfy the principle of least surprise given the general
conversion to three-part interval values --- it was an oversight that
these cases weren't dealt with in 8.1.  Michael Glaesemann
2006-09-04 01:26:28 +00:00
Tom Lane
6ca09ad703 Suppress 'unused variable' warnings created by latest commit. 2006-09-03 19:30:43 +00:00
Michael Meskes
246bd83811 Synced parser.
Added another regression test and fixed tcp test.
2006-09-03 12:24:08 +00:00
Michael Meskes
cda6d0a8d3 Second try committing the path changes. 2006-08-29 13:23:27 +00:00
Michael Meskes
67135eb1ef Removed debug option from pg_regress call.
Changed file paths in expected files too.
2006-08-29 12:33:45 +00:00
Michael Meskes
b1710339ba Fixed parser and library to allow empty database names.
Streamlined connection name parsing.
Added Joachim's patch to shorten paths before diffing.
2006-08-29 12:24:52 +00:00
Tom Lane
ae28cfe673 Partial fix for ecpg's VPATH problems. It compiles and successfully
builds all the files needed for its regression tests, but the tests
themselves fail because of diffs in the #line directives output by
ecpg itself.  Not sure what to do about that.
2006-08-28 16:13:11 +00:00
Michael Meskes
99a5619e7b - Enabled single-quoted connection targets.
- Fixed a memory leak/segfault in unsuccessful connection.
- Some changes to test files.
2006-08-27 16:15:42 +00:00
Michael Meskes
445a61297e Changed double output. 2006-08-26 11:50:00 +00:00
Michael Meskes
e96df81b17 Synced parser 2006-08-24 12:31:33 +00:00
Michael Meskes
8d9cf79437 Needed more stuff from c.h. 2006-08-24 10:48:21 +00:00
Michael Meskes
e8d1dcbfde Fixed of by one variable size. 2006-08-24 10:35:58 +00:00
Michael Meskes
b7d5a88dbb Need more defines in ecpg_config.h, patch sent by Rocco Altier <RoccoA@Routescape.com> 2006-08-24 09:37:07 +00:00
Michael Meskes
a6558b068d Somehow my version compiled but the change didn't make it to CVS. 2006-08-23 13:57:27 +00:00
Michael Meskes
02c3cdbaad Argh, forgot the new file yet again. 2006-08-23 12:51:26 +00:00
Michael Meskes
9bade3ff84 Replaced double-quote-fix with a hopefully better version.
Use initializer string length as size for character strings.
Added ecpg_config.h file that is created via configure.
2006-08-23 12:01:53 +00:00
Michael Meskes
54f5527606 Descriptor values were quoted twice.
Fixed some regression test problems.
2006-08-22 12:46:18 +00:00
Michael Meskes
fc19744e58 Added another test 2006-08-19 15:10:00 +00:00
Michael Meskes
84844bab2c More SoC stuff 2006-08-19 13:42:40 +00:00
Michael Meskes
46d61eb218 Fixed a buffer overrun that was masked on Linux systems. 2006-08-18 16:30:53 +00:00
Michael Meskes
e91600d1c2 Changed lexer to no longer use the default rule.
Synced parser and keyword list.
Fixed parsing of CONNECT statement so it accepts a C string again.
2006-08-18 15:59:35 +00:00
Michael Meskes
2834fb6a83 Fixed a typo and made two mallocs Coverity friendly. 2006-08-15 12:46:25 +00:00
Michael Meskes
4a445f5d97 Sorry, forgot the new files. 2006-08-15 06:48:24 +00:00
Michael Meskes
b30da7ba5f Added lots of SoC stuff made by Joachim.
Fixed broken newline on Windows.
Fixed a nasty buffer underrun that only occured when using Informix
no_indicator NULL setting on timestamps and intervals.
2006-08-15 06:40:20 +00:00
Michael Meskes
ab6aa40b64 Applied patch for VPATH builds by Alvaro Herrera <alvherre@commandprompt.com>
Merged dyntest.pgc and dyntest2.pgc.
Hopefully fixed the last Coverity reports (finally)
2006-08-13 10:18:31 +00:00
Tom Lane
0bf9d3a59e Fix inadequate makefile-fu in ecpg regression tests. I think this
will fix current platypus build failure.
2006-08-09 22:48:17 +00:00
Michael Meskes
e6e61afe16 Fixed some memory bugs that somehow reappeared.
Also fixed a new Coverity report.
2006-08-09 09:08:32 +00:00
Michael Meskes
7c9e2c75da Fixed error handling in numeric conversion (Joachim).
Further regression cleanup.
2006-08-09 07:30:56 +00:00
Tom Lane
644e3fe368 Fix 'make clean' for change of regression.diffs file name. 2006-08-08 19:43:11 +00:00
Michael Meskes
79a1a2ec6b Cleaned up log output a little bit more. 2006-08-08 15:30:39 +00:00
Michael Meskes
6e11202dbe Made parser check for valid copy to/from stdin/stdout combinations.
Lots of small changes in regression test suite
2006-08-08 11:51:25 +00:00
Michael Meskes
977ac90001 Joachim fixed some bugs in numeric handling in pgtypeslib.
Fixed and cleaned up some regression tests. Also added a new one.
2006-08-07 13:17:02 +00:00
Michael Meskes
1d28bf2589 Two more changes to regression tests to fix two differences in different setups. 2006-08-05 16:48:48 +00:00
Tom Lane
6db6714ffc Remove redeclaration of struct sqlca_t --- unnecessary and provokes
warnings on some compilers.
2006-08-04 16:54:05 +00:00
Tom Lane
5d844d3271 'make clean' must remove the create subdirectories results/ and log/,
not merely remove their contents.  Else 'cvs update' complains.
2006-08-04 14:18:09 +00:00
Michael Meskes
3ceaa97b3c Regression test updates and fixes 2006-08-04 08:52:18 +00:00
Bruce Momjian
9ac2f2e8ea Add missing ecpg function prototype needed when in threaded mode ---
supresses compiler warning.
2006-08-04 03:23:37 +00:00
Michael Meskes
4b8378a671 Removed compiler warnings 2006-08-03 14:50:11 +00:00
Michael Meskes
27458bb4fa Applied test suite update by Joachim Wieland <joe@mcknight.de>. 2006-08-03 13:11:04 +00:00
Andrew Dunstan
959aee5bbf remove extraneous space after -L flag. 2006-08-02 19:02:34 +00:00
Michael Meskes
efc861a842 And finally the Makefiles 2006-08-02 14:19:14 +00:00
Michael Meskes
1f0a6cd60c Hopefully that's it. The remaining files for ecpg regression tests. 2006-08-02 14:14:04 +00:00
Michael Meskes
b737f85e84 Some more regression test files 2006-08-02 13:53:45 +00:00
Michael Meskes
2682a4c01d One more file to remove 2006-08-02 13:52:11 +00:00
Michael Meskes
36e8d4e780 Removed old test files 2006-08-02 13:51:32 +00:00
Michael Meskes
1fa6be6f69 ynced parser and keyword list.
Implemented EXEC SQL UNDEF.
Applied first version of the regression test patch by Joachim Wieland <joe@mcknight.de>.
2006-08-02 13:43:23 +00:00
Michael Meskes
4cd72b53b9 Added missing ECPGget_sqlca() call 2006-07-31 13:26:46 +00:00
Michael Meskes
c1c9b7c0c0 First small patches needed for regression tests 2006-07-31 10:15:31 +00:00
Michael Meskes
0bee536ad8 Replaced $Header$ by $§PosgreSQL$ 2006-07-30 16:28:58 +00:00
Michael Meskes
cdf131abac Added missing $Header$ entries. 2006-07-30 10:24:10 +00:00
Michael Meskes
76475a7eb5 Variables should be free'ed only once. 2006-07-28 11:49:36 +00:00
Michael Meskes
a27cb17788 Removed superfluous comment 2006-07-28 10:12:56 +00:00
Michael Meskes
9e76b4c7c5 And one more:
Connection identifier has to be unique
2006-07-28 10:10:42 +00:00
Michael Meskes
72ba3cb50f Added more SoC changes by Joachim Wieland <joe@mcknight.de>:
- SHOW statement puts result into a variable
	- COPY TO STDOUT works
2006-07-28 09:08:01 +00:00
Tom Lane
a7143b3088 Fix some makefiles that fail to yield good results from 'make -qp'.
This doesn't really matter for ordinary building of Postgres, but it's
useful for automated checks, such as my just-committed pgcheckdefines.
2006-07-15 03:33:14 +00:00
Tom Lane
ae643747b1 Fix a passel of recently-committed violations of the rule 'thou shalt
have no other gods before c.h'.  Also remove some demonstrably redundant
#include lines, mostly of <errno.h> which was added to c.h years ago.
2006-07-14 05:28:29 +00:00
Bruce Momjian
b85a965f5f Allow each C include file to compile on its own by including any needed
header files.
2006-07-11 13:54:25 +00:00
Michael Meskes
956cbeb7ef Fixed remaining Coverity bugs. 2006-07-05 10:49:56 +00:00
Michael Meskes
4b98d423d7 Added missing braces to prevent a segfault after usage of an undeclared cursor. 2006-06-26 14:12:02 +00:00
Michael Meskes
ea9ec780ed Added some more coverity report patches send in by Joachim Wieland <joe@mcknight.de>. 2006-06-26 09:20:09 +00:00
Michael Meskes
17bab8c3fe Moved some free() calls that coverity correctly complains about. 2006-06-25 09:38:40 +00:00
Bruce Momjian
e970b2a62b Remove individual user copyright because the code is contributed to
PGDG:

> Yes. In fact the copyright belongs to credativ GmbH the company that
> paid Carsten for his work. As you may or may not know I'm the CEO of
> that company and can assure you that his work was contributed to the
> PostgreSQL project.
2006-06-25 01:45:32 +00:00
Michael Meskes
c2f3c168fb Clarified copyright notice 2006-06-23 14:50:01 +00:00
Michael Meskes
3f9aace723 Added some more coverity report patches send in by Martijn van Oosterhout <kleptog@svana.org>. 2006-06-21 11:38:07 +00:00
Michael Meskes
6bba43111e Fixed small typo in changelog 2006-06-21 10:34:48 +00:00
Michael Meskes
a829da152c Added fixed from the coverity report send in by Joachim Wieland <joe@mcknight.de>
Added missing error handling in a few functions in ecpglib
2006-06-21 10:24:41 +00:00
Michael Meskes
aaf125f8df Do not use already free'ed errmsg, bug found by Joachim Wieland
<joachim.wieland@credativ.de>
2006-06-19 09:19:49 +00:00
Michael Meskes
0251602fc9 Fixed two more memory leaks in ecpglib.
Synced parser.
2006-06-06 11:31:55 +00:00
Michael Meskes
085e7c2fd8 Somehow a ";" got lost which changed the logic. This btw is the first fix resulting from SoC. 2006-05-31 08:12:48 +00:00
Bruce Momjian
7a846ecc00 Use E'' strings internally only when standard_conforming_strings =
'off'. This allows pg_dump output with standard_conforming_strings =
'on' to generate proper strings that can be loaded into other databases
without the backslash doubling we typically do.  I have added the
dumping of the standard_conforming_strings value to pg_dump.

I also added standard backslash handling for plpgsql.
2006-05-26 23:48:54 +00:00
Bruce Momjian
ad98575617 Use SQL standard '' rather than \' for tutorial/sample code.
Backpatch to 8.1.X.
2006-05-11 19:21:14 +00:00
Tom Lane
637028afe1 Code review for standard_conforming_strings patch. Fix it so it does not
throw warnings for 100%-SQL-standard constructs, clean up some minor
infelicities, try to un-break ecpg to the best of my ability.  (It's not clear
how ecpg is going to find out the setting of standard_conforming_strings,
though.)  I think pg_dump still needs work, too.
2006-05-11 19:15:36 +00:00
Tom Lane
de762468aa We only need to add thread.c on non-WIN32 platforms, since get_home_path
doesn't use pqGetpwuid on WIN32.  Rather than try to figure out why it
won't build on WIN32, just remove it.
2006-04-29 20:13:07 +00:00
Tom Lane
1e7bb2da57 Arrange to strip libpq.so of symbols that aren't officially supposed to
be exported on Linux and Darwin.  We already did this on Windows but
that's not enough, as evidenced by the fact that libecpg had an unexpected
dependency on one such symbol.  We should try to do it on more platforms.
Fix ecpg's oversight, and bump libpq's major .so version number to reflect
the unwanted but nonetheless real ABI break.
2006-04-28 02:53:20 +00:00
Bruce Momjian
59d591e79a Back out RESET CONNECTION until there is more discussion. 2006-04-25 14:11:59 +00:00
Bruce Momjian
6378fdd971 Add RESET CONNECTION, to reset all aspects of a session.
Hans-J?rgen Sch?nig
2006-04-25 14:09:21 +00:00
Michael Meskes
524d65d459 Fixed memory leak bugs found by Martijn Oosterhout. 2006-04-24 09:45:22 +00:00
Michael Meskes
0941a8901b Fixed bug 2330: Wrong error code in case of a duplicate key 2006-03-17 15:46:13 +00:00
Bruce Momjian
4a85bf3eaf Remove Christof Petig copyright. He already approved removal from an
include file in the same area,.
2006-03-11 16:57:44 +00:00
Bruce Momjian
f3d99d160d Add CVS tag lines to files that were lacking them. 2006-03-11 04:38:42 +00:00
Bruce Momjian
4c0efd3ae2 Remove Christof Petig copyright on include file, per author request. 2006-03-08 22:00:27 +00:00
Tom Lane
012abebab1 Remove the stub support we had for UNION JOIN; per discussion, this is
not likely ever to be implemented seeing it's been removed from SQL2003.
This allows getting rid of the 'filter' version of yylex() that we had in
parser.c, which should save at least a few microseconds in parsing.
2006-03-07 01:00:19 +00:00
Tom Lane
48cf295742 'make clean' should NOT remove *~ files. 2006-03-07 00:48:07 +00:00
Bruce Momjian
19c21d115d Enable standard_conforming_strings to be turned on.
Kevin Grittner
2006-03-06 19:49:20 +00:00
Bruce Momjian
f2f5b05655 Update copyright for 2006. Update scripts. 2006-03-05 15:59:11 +00:00
Peter Eisentraut
7f4f42fa10 Clean up CREATE FUNCTION syntax usage in contrib and elsewhere, in
particular get rid of single quotes around language names and old WITH ()
construct.
2006-02-27 16:09:50 +00:00
Tom Lane
14ebeee134 C++ comments are verboten. Per gripe from Kris Jurka. 2006-02-09 07:22:22 +00:00
Tom Lane
3cb312d873 Fix broken non-YYDEBUG case. 2006-02-09 00:56:57 +00:00
Michael Meskes
e3740d2c59 Added just another test case.
Fixed missing continuation line character.
 Do not translate $-quoting.
 Bit field notation belongs to a variable not a variable list.
 Output of line number only done by one function.
2006-02-08 09:10:05 +00:00
Michael Meskes
a13c1edb57 Added C bit fields to ecpg parser
Added some default rules to lexer
Added log output to prepare statement
Added some more stuff to a test case
2006-02-04 20:54:44 +00:00
Bruce Momjian
b3769066b8 In ecpg, automatically double single quotes in $$ strings because
internally $$ strings are converted to single-quote strings.

In ecpg, output newlines in commands using standard C escapes, rather
than using literal newlines, which is not portable.
2006-02-04 02:32:38 +00:00
Bruce Momjian
890707a537 Improve tab whitespace in file.
Add comment about $$ and '' SCONST strings.
2006-02-03 05:38:35 +00:00
Bruce Momjian
46dfa5ec83 More spacing cleanups. 2006-02-02 03:51:41 +00:00
Bruce Momjian
d63901c9d0 Source code alignment fixes for preproc.y. 2006-02-01 22:16:36 +00:00
Bruce Momjian
a274239bce More alignment improvements. 2006-02-01 20:57:39 +00:00
Bruce Momjian
71b9df2bed Make pgc.l source code alignment consistent. 2006-02-01 20:56:44 +00:00
Michael Meskes
69f9fab197 - Synced parser and keyword list.
- Added another test case.
2006-01-24 11:01:38 +00:00
Michael Meskes
f3dda5be89 Data transferred binary is now put into the variables verbatim.
Also added a test case for a binary cursor.
2006-01-17 19:49:23 +00:00
Neil Conway
1ce4c9e9b4 When using GCC on AMD64 and PPC, ECPGget_variable() takes a va_list *, not
a va_list. Christof Petig's previous patch made this change, but neglected
to update ecpglib/descriptor.c, resulting in a compiler warning (and a
likely runtime crash) on AMD64 and PPC.
2006-01-15 22:46:53 +00:00
Bruce Momjian
44f9021223 Remove BEOS port. 2006-01-05 03:01:38 +00:00
Neil Conway
12119188fe Revert some careless search-and-replace: "ADD" in comment text should
not be replaced with "ADD_P".
2005-12-29 04:53:18 +00:00
Bruce Momjian
a4a4b8bb02 Protect ADD and HEADER symbols from conflicting with MIPS includes. 2005-12-27 04:00:08 +00:00
Peter Eisentraut
a29c04a541 Allow installation into directories containing spaces in the name. 2005-12-09 21:19:36 +00:00
Bruce Momjian
7b1a7e786e Stamp libraries for 8.2 by updating minor library version numbers and
Win32 library files.
2005-12-09 02:49:09 +00:00
Tom Lane
974c5a8730 ecpg/pgtypeslib seems to need snprintf.c pulled in, too. 2005-12-06 05:26:21 +00:00
Tom Lane
e0e7589169 Make Win32 build use our port/snprintf.c routines, instead of depending
on libintl which may or may not provide what we need.  Make a few marginal
cleanups to ensure this works.  Andrew Dunstan and Tom Lane.
2005-12-06 02:29:04 +00:00
Michael Meskes
5106aff99a Added special handling of CONNECTION variable that is used by ECPG instead of given to the backend. 2005-12-02 15:03:57 +00:00
Michael Meskes
150131d9d9 - Made several variables "const char *" instead of "char *" as proposed by Qingqing Zhou <zhouqq@cs.toronto.edu>.
- Replaced all strdup() calls by ECPGstrdup().
- Set ecpg library version to 5.2.
- Set ecpg version to 4.2.1.
2005-11-30 12:49:49 +00:00
Tom Lane
1b68a88f22 Add missing semicolon. Recent versions of bison seem to choke on this,
per buildfarm report from platypus, even though older versions let it pass.
2005-11-27 01:22:23 +00:00
Bruce Momjian
436a2956d8 Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib
directory.  Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).

Backpatch to 8.1.X.
2005-11-22 18:17:34 +00:00
Bruce Momjian
1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
Bruce Momjian
a93bf4503f Allow times of 24:00:00 to match rounding behavior:
regression=# select '23:59:59.9'::time(0);
	   time
	----------
	 24:00:00
	(1 row)

	This is bad because:

	regression=# select '24:00:00'::time(0);
	ERROR:  date/time field value out of range: "24:00:00"

The last example now works.
2005-10-14 11:47:57 +00:00
Tom Lane
d7527540f2 <limits.h> is now needed here, for INT_MAX. Per Michael Fuhr. 2005-10-10 01:34:00 +00:00
Tom Lane
313ed1ed94 Fix (hopefully for the last time) problems with datetime values displaying
like '23:59:60' because of fractional-second roundoff problems.  Trying
to control this upstream of the actual display code was hopeless; the right
way is to explicitly round fractional seconds in the display code and then
refigure the results if the fraction rounds up to 1.  Per bug #1927.
2005-10-09 17:21:47 +00:00
Bruce Momjian
adeca513f7 Add spacing around operators. 2005-10-08 02:39:27 +00:00
Bruce Momjian
77d1de3c89 Minor parentheses cleanup. 2005-10-07 20:26:41 +00:00
Michael Meskes
a5fecda550 Also synced the ecpg lexer with the backend lexer. 2005-10-05 14:58:36 +00:00
Michael Meskes
ffa156bb5b Somehow I missed some parser changes, so this commit comes pretty late. I just synced the parser of ecpg against the backend version, but still have to sync the lexer.
Also I fixed a bug in a bug fix I committed a few weeks ago. he check for a varchar pointer was incomplete.
2005-10-04 13:28:21 +00:00
Tom Lane
303e089df5 Clean up possibly-uninitialized-variable warnings reported by gcc 4.x. 2005-09-24 22:54:44 +00:00
Michael Meskes
c959d370bf Fixed transaction command handling to not ignore savepoints and to correctly check for errors. 2005-09-12 11:57:53 +00:00
Tom Lane
6b44d796c7 Fix misspelled error message. 2005-08-29 01:32:00 +00:00
Michael Meskes
f417ebf03a - Check for NULL before checking whether argument is an array.
- Remove stary character from string quoting.
        - Fixed check to report missing varchar pointer implementation.
2005-08-24 10:34:19 +00:00
Bruce Momjian
9bddb5c8c7 Back out incorrect use of E'' escape addition. 2005-08-22 20:25:03 +00:00
Bruce Momjian
3758affc9b More removal of unneeded parentheses. 2005-07-22 19:00:55 +00:00
Bruce Momjian
75e5aba7fe Update date/time comments. 2005-07-22 05:08:26 +00:00
Bruce Momjian
d5f1e08c0c Code spacing improvement, particularly *tm spacing. 2005-07-22 03:46:34 +00:00
Bruce Momjian
e9c44bd382 More comment update of time macros. 2005-07-21 20:37:21 +00:00
Bruce Momjian
e6b72d6af6 Update DAYS_PER_MONTH comment.
Add SECS_PER_YEAR and MINS_PER_HOUR macros.
2005-07-21 18:06:13 +00:00
Bruce Momjian
a0407f508a Add comment about void* use in MemSet. 2005-07-21 15:16:30 +00:00
Bruce Momjian
b4bdab8105 Fix integer timestamp build for macro changes. 2005-07-21 05:18:26 +00:00
Bruce Momjian
aa0f6e8d06 Add comment marking non-exact time conversion macros. 2005-07-21 04:48:42 +00:00
Bruce Momjian
a536b2dd80 Add time/date macros for code clarity:
#define DAYS_PER_YEAR   365.25
	#define MONTHS_PER_YEAR 12
	#define DAYS_PER_MONTH  30
	#define HOURS_PER_DAY   24
2005-07-21 03:56:25 +00:00
Bruce Momjian
db05f4a7eb Add 'day' field to INTERVAL so 1 day interval can be distinguished from
24 hours. This is very helpful for daylight savings time:

	select '2005-05-03 00:00:00 EST'::timestamp with time zone + '24 hours';
	      ?column?
	----------------------
	2005-05-04 01:00:00-04

	select '2005-05-03 00:00:00 EST'::timestamp with time zone + '1 day';
	      ?column?
	----------------------
	2005-05-04 01:00:00-04

Michael Glaesemann
2005-07-20 16:42:32 +00:00
Bruce Momjian
7f0b690334 Improve comments for AdjustIntervalForTypmod.
Blank line adjustments.
2005-07-12 16:05:12 +00:00
Bruce Momjian
8a79451152 I have to admit that I got the case of the preprocessor symbol on amd64
wrong. __AMD64__ is not defined, __amd64__ is.

Christof Petig
2005-07-04 19:05:45 +00:00
Bruce Momjian
74b49a8129 Add E'' to internally created SQL strings that contain backslashes.
Improve code clarity by using macros for E'' processing.
2005-07-02 17:01:59 +00:00
Neil Conway
555f5139e0 Adds some missing error handling to PGTYPESnumeric_div() in ecpg's
pgtypeslib: (1) we need to check the return value of sub_abs() (2) we
need to check the return value of 4 calls to digitbuf_alloc().

Per Coverity static analysis performed by EnterpriseDB.
2005-07-01 05:13:58 +00:00
Neil Conway
9fad4cb604 Fix some minor infelicities in ecpg's pgtypeslib: (1) `pstr' must be
non-NULL in this function, so there is no need to check for it (2) we
should check the return value of pgtypes_strdup(). Patch from Eric
Astor at EnterpriseDB, with slight cleanup by myself, per a report
from the Coverity tool.
2005-07-01 05:12:06 +00:00
Neil Conway
117fde2d17 Minor ecpg tweak: the return value of calloc() is guaranteed to be NULL
or zero-filled; therefore zero-filling it via memset() is pointless.
(I think setting `errno' is probably a waste of cycles as well, but I
haven't changed that.)
2005-06-30 07:27:31 +00:00
Neil Conway
4802bb57a6 Warning cleanups for ecpg tests. Avoid doing pointer arithmetic on void *,
remove old-style function declarations, and mark a function "static".
There are some remaining warnings, but this fixes most of them, anyway.
2005-06-30 07:08:59 +00:00
Neil Conway
175c25a404 Fix ecpg's test/ Makefile for out-of-tree (vpath) builds. 2005-06-30 07:01:57 +00:00
Tom Lane
6f7fc0bade Cause initdb to create a third standard database "postgres", which
unlike template0 and template1 does not have any special status in
terms of backend functionality.  However, all external utilities such
as createuser and createdb now connect to "postgres" instead of
template1, and the documentation is changed to encourage people to use
"postgres" instead of template1 as a play area.  This should fix some
longstanding gotchas involving unexpected propagation of database
objects by createdb (when you used template1 without understanding
the implications), as well as ameliorating the problem that CREATE
DATABASE is unhappy if anyone else is connected to template1.
Patch by Dave Page, minor editing by Tom Lane.  All per recent
pghackers discussions.
2005-06-21 04:02:34 +00:00
Bruce Momjian
e046b3ddd7 Add \x hex support to ecpg strings. This just passes them to the backend. 2005-06-16 01:43:48 +00:00
Michael Meskes
2d5d691d15 - Fixed memory leak in ecpglib by adding some missing free() commands.
- Added patch by Gavin Scott <gavin@planetacetech.com> for Intel 64bit hardware.
2005-06-02 12:35:11 +00:00
Bruce Momjian
d4b50caf25 Display only 9 subsecond digits instead of 10 for time values, for
consistency and to prevent rounding for days < 30.  Also round off all
trailing zeros, rather than leaving an even number of digits.
2005-05-27 21:31:23 +00:00
Bruce Momjian
fbdb203a39 Back out part of patch that should be applied later. 2005-05-27 15:16:45 +00:00
Bruce Momjian
22f0303023 Fix compile of entab to use stdarg.h. Clean up includes.
Marko Kreen
2005-05-27 15:15:31 +00:00
Bruce Momjian
1b3bb23cc8 Use Abs() macro to replace ? :. 2005-05-26 16:44:05 +00:00
Bruce Momjian
f35d493d16 Back out:
Display only 9 not 10 digits of precision for timestamp values when
using non-integer timestamps.  This prevents the display of rounding
errors for common values like days < 32.
2005-05-26 15:26:00 +00:00
Bruce Momjian
4c862b18f9 Display only 9 not 10 digits of precision for timestamp values when
using non-integer timestamps.  This prevents the display of rounding
errors for common values like days < 32.
2005-05-26 03:48:25 +00:00
Bruce Momjian
b492c3accc Add parentheses to macros when args are used in computations. Without
them, the executation behavior could be unexpected.
2005-05-25 21:40:43 +00:00
Bruce Momjian
09ff9dbe2b Remove more extraneous parentheses in date/time functions. 2005-05-24 02:09:45 +00:00
Bruce Momjian
4550c1e519 More macro cleanups for date/time. 2005-05-23 21:54:02 +00:00
Bruce Momjian
5ebaae801c Add datetime macros for constants, for clarity:
#define SECS_PER_DAY  86400
#define USECS_PER_DAY INT64CONST(86400000000)
#define USECS_PER_HOUR    INT64CONST(3600000000)
#define USECS_PER_MINUTE INT64CONST(60000000)
#define USECS_PER_SEC INT64CONST(1000000)
2005-05-23 18:56:55 +00:00
Michael Meskes
9dc2e6deaf Added patch by Philip Yarra <philip.yarra@internode.on.net> for a bug in thread support. 2005-04-14 10:08:57 +00:00
Michael Meskes
1f418555cf Added patch by Christof Petig <christof@petig-baender.de> to work around gcc bug on powerpc and amd64. 2005-03-18 10:00:43 +00:00
Bruce Momjian
2b0bb797ec Bump minor version numbers for 8.1 compared to 8.0. 2005-03-14 17:27:50 +00:00
Bruce Momjian
caad817d1c Add fprintf() custom version to libpgport.
Document use of macros for pg_printf functions.

Bump major versions of all interfaces to handle movement of get_progname
from libpq to libpgport in 8.0, and probably other libpgport changes in 8.1.
2005-03-11 19:13:43 +00:00
Michael Meskes
5cc8884a5d Fixed changelog entry to list correct bug reporter. 2005-02-10 08:08:52 +00:00
Michael Meskes
7e786a82ca Fixed more parsing bugs in other CREATE statements as pointed out by TANIDA
Yutaka <tanida@sra.co.jp>.
2005-02-10 08:06:35 +00:00
Michael Meskes
d32b3aec52 Fixed bug in parsing of CREATE AS statement. 2005-02-09 11:26:44 +00:00
Michael Meskes
4b56bd85c0 Fixed bug in parsing of #line statement in declare section. 2005-02-02 15:37:43 +00:00
Tom Lane
889f038129 Use SHGetFolderPath instead of SHGetSpecialFolderPath to find the
APPDATA directory on Windows.  Magnus Hagander
2005-01-26 19:24:03 +00:00
Michael Meskes
d314616d12 Fixed segfault due to freeing a struct definition twice if it was a named struct used in a typedef. 2005-01-25 12:51:31 +00:00
Bruce Momjian
31197bbdf5 Update version stamps for 8.1 as listed in RELEASE_CHANGES. 2005-01-18 05:00:35 +00:00
Tom Lane
d3d00715e2 interval_out failed to mention 'ago' for negative intervals in SQL and
GERMAN datestyles.  Ancient bug reported by Terry Lee Tucker.
2005-01-11 18:33:46 +00:00
Michael Meskes
cc7cd8774a Fixed segfault in adjust_informix due to missing varchar type. 2005-01-10 12:58:30 +00:00
Tom Lane
7e1c8ef4fc Some more missed copyright notices. Many of these look like they
should have been caught by the src/tools/copyright script ... why
weren't they?
2005-01-01 20:44:34 +00:00
PostgreSQL Daemon
2ff501590b Tag appropriate files for rc3
Also performed an initial run through of upgrading our Copyright date to
extend to 2005 ... first run here was very simple ... change everything
where: grep 1996-2004 && the word 'Copyright' ... scanned through the
generated list with 'less' first, and after, to make sure that I only
picked up the right entries ...
2004-12-31 22:04:05 +00:00
Michael Meskes
1fbdb6bc9f Fixed segfault in connect when specifying no database name. 2004-12-30 09:36:37 +00:00
Bruce Momjian
f9a134b6e4 Add missing ecpg prototype for newly added functions. 2004-12-23 13:19:17 +00:00
Michael Meskes
f0299325e4 Added PGTYPEStimestamp_add_interval written by Dave Cramer.
Fixed parsing of defines to make sure they used more than once.
2004-12-23 10:46:10 +00:00
Michael Meskes
ec7806db2c Fixed bug in parsing of typedef'ed array sizes.
Synced parser.
2004-12-06 20:35:35 +00:00
Tom Lane
a34d76ef65 Fix up makefile dependencies for pg_config_paths.h. 2004-11-20 21:13:06 +00:00
Michael Meskes
67e1ae9b03 List VALUE as a keyword. 2004-11-10 13:48:10 +00:00
Peter Eisentraut
e9c05281b5 Get rid of perror(), substitute some better phrased error messages.
malloc() doesn't set errno, so most uses were buggy anyway.
2004-11-09 15:57:57 +00:00
Tom Lane
98e8b48053 Create 'default_tablespace' GUC variable that supplies a TABLESPACE
clause implicitly whenever one is not given explicitly.  Remove concept
of a schema having an associated tablespace, and simplify the rules for
selecting a default tablespace for a table or index.  It's now just
(a) explicit TABLESPACE clause; (b) default_tablespace if that's not an
empty string; (c) database's default.  This will allow pg_dump to use
SET commands instead of tablespace clauses to determine object locations
(but I didn't actually make it do so).  All per recent discussions.
2004-11-05 19:17:13 +00:00
Dave Cramer
7914deecb8 fixed bug in segfault REVOKE statement 2004-11-01 13:17:12 +00:00
Michael Meskes
51aacecae6 Synced parser 2004-10-18 13:36:23 +00:00
Bruce Momjian
5c267325ec Add 'int' cast for getpid() because some Solaris releases return long
for getpid().
2004-10-14 20:23:46 +00:00
Neil Conway
7069dbcc31 More minor cosmetic improvements:
- remove another senseless "extern" keyword that was applied to a
function definition
- change a foo more function signatures from "some_type foo()" to
"some_type foo(void)"
- rewrite another K&R style function definition
- make the type of the "action" function pointer in the KeyWord struct
in src/backend/utils/adt/formatting.c more precise
2004-10-13 01:25:13 +00:00
Neil Conway
0b112045b7 Fix vpath build break, induced by Bruce's recent commit. 2004-10-12 04:48:36 +00:00
Bruce Momjian
29e7dc420a Add some pg_config_path.h dependencies for places that include
pg_config_paths.h outside of /src/port.
2004-10-12 01:04:11 +00:00
Neil Conway
0e72b9d440 Cosmetic improvements/code cleanup:
- replace some function signatures of the form "some_type foo()" with
"some_type foo(void)"
- replace a few instances of a literal 0 being used as a NULL pointer;
there are more instances of this in the code, but I just fixed a few
- in src/backend/utils/mb/wstrncmp.c, replace K&R style function
declarations with ANSI style, remove use of 'register' keyword
- remove an "extern" modifier that was applied to a function definition
(rather than a declaration)
2004-10-10 23:37:45 +00:00
Bruce Momjian
67608a393b Make getpid() use %d consistently for printing. 2004-10-09 02:46:42 +00:00
Bruce Momjian
da67c919d9 Add Win32 version info to client binaries.
Magnus Hagander
2004-10-05 19:30:25 +00:00
Michael Meskes
a79f8195de '::' is no longer interpreted as a variable in a prepare statement. 2004-10-05 10:48:37 +00:00
Bruce Momjian
ee7de3d662 Make sure no libs use libpgport by removing it from the link line. 2004-10-04 20:36:12 +00:00
Bruce Momjian
24201b4bc6 Make libpgport be front-end only and make libpgport_srv be a backend
library that uses palloc, ereport, etc.  This simplifies the makefiles
for client applications.
2004-10-04 13:43:59 +00:00
Michael Meskes
d56b9fdaa8 Synced parser.
Removed Oracle transaction syntax to fix shift/reduce error.
2004-09-27 09:59:17 +00:00
Bruce Momjian
f1d1116178 Fix Cygwin defines to be consistent. 2004-09-09 00:59:49 +00:00
Bruce Momjian
b70999d0fd Make TZNAME_GLOBAL for reference to tzname global variable. 2004-09-09 00:24:12 +00:00
Bruce Momjian
e97c817092 Use _timezone global on Cygwin instead of timezone. 2004-09-08 19:43:12 +00:00
Michael Meskes
2a8b626d48 Fixed segfault in Informix mode. 2004-09-06 11:23:07 +00:00
Bruce Momjian
bd9b951191 Back out Cygwin timezone change until we have a more global solution. 2004-09-01 18:59:35 +00:00
Bruce Momjian
33f395eada Cast _timezone to int from time_t for Cygwin. 2004-09-01 04:02:06 +00:00
Bruce Momjian
15d3f9f6b7 Another pgindent run with lib typedefs added. 2004-08-30 02:54:42 +00:00
Bruce Momjian
b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
Bruce Momjian
da9a8649d8 Update copyright to 2004. 2004-08-29 04:13:13 +00:00
Tom Lane
7ff1c9d974 Add missing semicolon; some bison versions warn of this. 2004-08-28 18:04:51 +00:00
Tom Lane
3de91c18b5 Fix broken parsing of CREATE TABLE AS (looks like a mis-sync with main
parser).
2004-08-11 22:50:35 +00:00
Bruce Momjian
020ec1629b Fix syntax error by adding a space. 2004-08-04 16:02:08 +00:00
Michael Meskes
b14158f405 SQL defines are only used in SQL space in Informix mode. 2004-07-26 10:28:28 +00:00
Michael Meskes
5420ed3a81 Synced parser and keyword list.
Fixed handling of cyclic defines.
2004-07-20 18:06:41 +00:00