Commit Graph

1151 Commits

Author SHA1 Message Date
Michael Meskes
a9bc069c0b - Removed duplicate include of ecpgtype.h which meant I had to adapt all expected results.
- Changed INFORMIX mode symbol definition yet again because the old way didn't work on NetBSD. Hopefully this one does.
2008-02-17 18:14:29 +00:00
Tom Lane
e67867b26c Allow AS to be omitted when specifying an output column name in SELECT
(or RETURNING), but only when the output name is not any SQL keyword.
This seems as close as we can get to the standard's syntax without a
great deal of thrashing.  Original patch by Hiroshi Saito, amended by me.
2008-02-15 22:17:06 +00:00
Michael Meskes
efac2796e6 Changed the way symbols are defined in C in INFORMIX mode. 2008-02-15 11:20:21 +00:00
Michael Meskes
423abf4d6a - EXECUTE can return NOT FOUND so it should be checked here too.
- Changed regression test accordingly.
2008-02-14 14:54:48 +00:00
Michael Meskes
a3a648ecc9 Sorry, accidently committed a patch I'm working on. Reverting it.
The only correct change was:
- Added SQLSTATE macro closing bug #3961.
2008-02-14 12:27:26 +00:00
Michael Meskes
78772dc018 *** empty log message *** 2008-02-14 12:22:36 +00:00
Bruce Momjian
87cc5af75e Bump minor library version numbers for 8.4. 2008-02-13 18:14:46 +00:00
Michael Meskes
fa0dc92fd8 - Fixed segfault in ecpg when using an array element.
- Free all memory in auto-prepare mode.
2008-02-07 11:09:13 +00:00
Michael Meskes
dbdc2e52a0 Re-enabled variables in fetch/move command. 2008-01-15 10:31:47 +00:00
Michael Meskes
1460c82151 Set valid return values even in case of an error to prevent segfaults. 2008-01-14 09:43:42 +00:00
Michael Meskes
149db6b6b7 Changed prototype for ECPGdo because some compilers don't like int/enum aliasing in there. 2008-01-13 11:53:16 +00:00
Michael Meskes
da758c266c Fixed lexer to correctly parse C quotes. 2008-01-11 15:19:16 +00:00
Tom Lane
867ff0727f informix.c was violating the coding rule about not including any
system headers before c.h.  Per report from J6M.
2008-01-08 01:14:52 +00:00
Bruce Momjian
9098ab9e32 Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
Michael Meskes
332bed8c6b Sorry, hit the wrong button with my last commit. Here's the correct changelog:
Applied patch send by ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> to fix bug in connect statement if user name is a variable.
Also fixed test case that didn't detect this.
2007-12-28 11:30:54 +00:00
Michael Meskes
2f86ab7733 *** empty log message *** 2007-12-28 11:25:21 +00:00
Michael Meskes
51a5921dcc Fixed a few minor glitches pointed out by splint. 2007-12-21 14:33:20 +00:00
Bruce Momjian
f6e8730d11 Re-run pgindent with updated list of typedefs. (Updated README should
avoid this problem in the future.)
2007-11-15 22:25:18 +00:00
Bruce Momjian
fdf5a5efb7 pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
Michael Meskes
e9d7bd2650 Fixed two parser bugs. 2007-11-06 08:32:08 +00:00
Tom Lane
bcb3852c33 Fix deprecated-by-C-spec usage: storage class should come before const
decoration.  Zdenek Kotala
2007-11-05 20:57:24 +00:00
Tom Lane
462227dc00 Avoid having backend-only code compiled into ecpg. Per Zdenek Kotala 2007-10-26 14:17:53 +00:00
Michael Meskes
ea82ad6aff Synced parser and keyword list. 2007-10-10 06:33:17 +00:00
Tom Lane
eefd10c66c Fix distprep and maintainer-clean targets so that ecpg's .def files are
made and removed at the correct times.
2007-10-05 01:51:40 +00:00
Tom Lane
b8f41d508c Add .cvsignore files to suppress CVS gripes about ecpg .def files. 2007-10-05 01:35:55 +00:00
Tom Lane
8dfca24b6b Results from buildfarm show that ecpglib was depending on pg_strcasecmp,
which evidently it got as an unofficial export from pgtypeslib.
2007-10-04 20:54:08 +00:00
Tom Lane
c86ce06964 DLL_DEFFILE should be defined when PORTNAME is win32, not when it isn't,
per the example of libpq/Makefile.
2007-10-04 18:32:07 +00:00
Michael Meskes
746593efe6 Replaced tabs by white spaces 2007-10-04 17:49:31 +00:00
Michael Meskes
085ffb24dc Removed newline at end of exports files. 2007-10-04 16:29:33 +00:00
Michael Meskes
133d77a906 Added def-files to all: target so they are build everytime. 2007-10-04 07:58:15 +00:00
Tom Lane
b3ab9b45da Suppress compiler warning in non-threaded build. 2007-10-03 16:03:25 +00:00
Tom Lane
6cbb2353cb Tweak recently-added tests to suppress scary-looking warnings on 64-bit
machines about casts between pointers and integers of different sizes.
While they're harmless, we shouldn't expect users to have to go through
and figure that out for themselves.
2007-10-03 15:59:13 +00:00
Michael Meskes
2b0e46eef0 Argh, missing dll in filename 2007-10-03 15:24:19 +00:00
Tom Lane
a248dbc4f8 Fix command for fetching snprintf.c. 2007-10-03 15:04:23 +00:00
Michael Meskes
f06a2b0ecc This could be what's missing on some systems. 2007-10-03 14:42:16 +00:00
Michael Meskes
c95f5e80a9 Stripped two symbols that are needed. 2007-10-03 14:01:28 +00:00
Michael Meskes
ab8d123a3c Also build snprintf from pgport if needed. 2007-10-03 13:40:52 +00:00
Michael Meskes
449fcf47fb Remove exports.list in clean target. 2007-10-03 13:24:54 +00:00
Michael Meskes
fa8a9f373c Also created export list for pgytpeslib and compatlib.
Set pgtypes library version to 3.0.
Set compat library version to 3.0.
2007-10-03 13:20:19 +00:00
Magnus Hagander
f83e44aecd Use snprintf from libpgport in ecpg compatlib. Required since
we restricted exports from ecpglib.
2007-10-03 12:34:29 +00:00
Magnus Hagander
5d0f18d6ad Fix typo 2007-10-03 12:11:37 +00:00
Magnus Hagander
6ddbc1164d Make ECPG regression tests run with -c only for array_of_struct.pgc
on MSVC.

Fix strange nonstandard version of __stdcall specifyer in thread
tests on win32.
2007-10-03 11:57:36 +00:00
Michael Meskes
7793c6ecca Cleaned up ecpglib and renamed functions that do not need to be exported.
Created export list for ecpglib.
2007-10-03 11:11:12 +00:00
Michael Meskes
c4a6c2f871 Hopefully fixed some stuff that causes Windows builds to fail. 2007-10-03 08:55:23 +00:00
Michael Meskes
5a0d31d3dc Made new test also work without threading enabled. 2007-10-02 14:01:57 +00:00
Michael Meskes
b5efdbac5c No idea where this file came from. 2007-10-02 09:51:41 +00:00
Michael Meskes
0c2eb200d6 ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> added thread-safe
descriptor handling
2007-10-02 09:50:00 +00:00
Tom Lane
3ff0018c2e In hopes of un-breaking the buildfarm, add missing file from
ITAGAKI Takahiro's patch.
2007-09-30 17:50:56 +00:00
Michael Meskes
60e83cec57 Applied another patch by ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp>
to get memory allocation thread-safe. He also did some cleaning up.
2007-09-30 11:38:48 +00:00
Tom Lane
314ed5de6d Define the FRONTEND symbol in postgres_fe.h, which allows us to eliminate
duplicative -DFRONTEND flags from many Makefiles.  We still need Makefile
control of the symbol in a few places that compile frontend-or-backend
src/port/ files, but it's a lot cleaner than before.

Hiroshi Saito
2007-09-27 19:53:44 +00:00
Michael Meskes
d49b20fbe6 Applied patch by ITAGAKI Takahiro <itagaki.takahiro@oss.ntt.co.jp> to get prepare thread-safe. 2007-09-26 10:57:01 +00:00
Michael Meskes
3e77c8c6c6 Removed superfluous ECPGfree() call. 2007-09-21 10:59:27 +00:00
Michael Meskes
a6b5765c7e Synced parser and keyword list. 2007-09-04 10:02:29 +00:00
Michael Meskes
c7b6593042 Fixed bug in Informix define handling. 2007-08-29 13:58:13 +00:00
Andrew Dunstan
1535f26c70 unbreak ECPG tests for VPATH builds. 2007-08-23 00:38:17 +00:00
Michael Meskes
fefe7034e2 More cleaning up and removed some duplicates. 2007-08-22 08:20:58 +00:00
Michael Meskes
002b4781ba It seems we simply expected the same output for failure and success. 2007-08-14 11:21:38 +00:00
Michael Meskes
8187905913 It seems I always forget .in files. 2007-08-14 10:56:20 +00:00
Michael Meskes
cbe74fafe5 Hopefully fixed missing CHAR_BIT symbol 2007-08-14 10:54:57 +00:00
Michael Meskes
aa130f5c42 Fixed compiler warning for enum handling 2007-08-14 10:32:47 +00:00
Michael Meskes
146242fc9c As usual I forgot some files. :-) 2007-08-14 10:19:14 +00:00
Michael Meskes
635a0b9a86 - Finished major rewrite to use new protocol version
- Really prepare statements
- Added more regression tests
- Added auto-prepare mode
- Use '$n' for positional variables, '?' is still possible via ecpg option
- Cleaned up the sources a little bit
2007-08-14 10:01:54 +00:00
Michael Meskes
a1b336679c Synced parser 2007-07-25 16:10:41 +00:00
Magnus Hagander
906b2e1b37 Rename DLLIMPORT macro to PGDLLIMPORT to avoid conflict with
third party includes (like tcl) that define DLLIMPORT.
2007-07-25 12:22:54 +00:00
Michael Meskes
839fcc9fd0 Applied patch by Joachim to enable checktcp again 2007-06-15 08:23:52 +00:00
Magnus Hagander
56813a998c Add resultmap entries for mingw - same as for msvc 2007-06-14 13:15:58 +00:00
Magnus Hagander
6d12c7dcd4 Properly identify mingw as a win32 platform needing different diff
options to deal with strange line endings.
2007-06-14 13:10:11 +00:00
Alvaro Herrera
e41c7bb7cd VPATH fixes. 2007-06-12 15:00:41 +00:00
Magnus Hagander
ee9d55cb52 Fix search/replace error in makefile for ecpg tests 2007-06-12 13:09:58 +00:00
Michael Meskes
5e96a7b96c Fixed reduce/recuce problem due to CURRENT_P. 2007-06-12 11:32:30 +00:00
Magnus Hagander
09922597c5 Rewrite ECPG regression test driver in C, by splitting the standard
regression driver into two parts and reusing half of it. Required to
run ECPG tests without a shell on MSVC builds.

Fix ECPG thread tests for MSVC build (incl output files).

Joachim Wieland and Magnus Hagander
2007-06-12 11:07:34 +00:00
Michael Meskes
e514740e69 Synced parser and keyword list. 2007-06-12 07:55:56 +00:00
Michael Meskes
88a7c4822c Should not try to unlink stdout. 2007-06-11 12:01:23 +00:00
Michael Meskes
91411b6105 Fixed one memory leak in descriptor code.
Made sure ecpg deletes output file in case of an error.
2007-06-11 11:52:08 +00:00
Peter Eisentraut
efbd5bcb5a Update expected files for textual changes 2007-06-04 07:48:17 +00:00
Peter Eisentraut
7ce9b3683e Make some messages more consistent 2007-05-31 15:13:06 +00:00
Michael Meskes
7e72d07aa4 Applied patch send by Joachim Wieland to fix INTEGER_DATETIMES under MSVC. 2007-05-28 09:46:47 +00:00
Michael Meskes
a0c366d5a1 Sorry guys, I committed the file from my development snapshot instead the one from HEAD. Fixing it now. 2007-05-27 15:59:57 +00:00
Michael Meskes
eff6773ae6 The source code changed, so the expected file changed too. 2007-05-27 11:32:59 +00:00
Michael Meskes
93625aa8ac Applied Joachim's patch for ecpg_config.h creation on Vista.
Changed variable test to not run into infinite loops on backend errors.
2007-05-27 11:16:41 +00:00
Michael Meskes
9ab58bbda6 Also removed the function not just the call, sorry. 2007-05-21 07:07:48 +00:00
Michael Meskes
439cf8e676 Do not try to find local timezone in DecodeDateTime() because the
result is not used anyway. This also fixes Vista's build problems.
2007-05-21 07:04:00 +00:00
Michael Meskes
2f2717d14f tackling Vista problem - another try 2007-05-20 11:30:30 +00:00
Michael Meskes
3e7956cab7 Removed mktime() call to hopefully get rid of some compatibility problems. 2007-05-17 20:07:35 +00:00
Michael Meskes
b1110aaa8b Added some more error logging. 2007-05-10 14:29:21 +00:00
Michael Meskes
1aca1cde52 - Synced parser and keyword list
- Renamed update test so it hopefully runs on Vista
2007-05-10 09:53:17 +00:00
Michael Meskes
85a3fce996 Removed non-existant function from extern.h 2007-04-27 07:55:14 +00:00
Michael Meskes
c8577c6c7f Inlined two functions to get rid of va_list problems on some archs. 2007-04-27 06:56:11 +00:00
Peter Eisentraut
ae8072a404 Complete cleaning 2007-04-01 08:56:58 +00:00
Magnus Hagander
96b171903d Make ECPG regression tests use native threading instead of pthreads, now that
ecpglib supports it.
Change configure (patch from Bruce) and msvc build system to no longer require
 pthreads on win32, since all parts of postgresql can be thread-safe using the
 native platform functions.
2007-03-29 15:30:52 +00:00
Michael Meskes
ddcb5bbf76 - Added patch by Magnus Hagander <magnus@hagander.net> to use native
win32 threads.
- Fixed regression tests to run threading tests.
2007-03-29 12:02:24 +00:00
Tom Lane
856b87c294 Fix typo, ensable -> enable, per Steve Gieseking. 2007-03-27 03:25:28 +00:00
Tom Lane
584b6dc2d5 Fix ecpg/preproc makefile for parallel builds: parser.o must depend
on preproc.h, else make may try to build it before preproc.h is ready.
Per failures seen here and in buildfarm.
2007-03-18 17:57:34 +00:00
Michael Meskes
d3e131e062 - Changed some whitespacing in connect statement.
- Made some chars const as proposed by Stefan Huehner <stefan@huehner.org>.
- Synced parser and keyword lists.
- Copied two token parsing from backend parser to ecpg parser.
- Also added a test case for this.
2007-03-17 19:25:24 +00:00
Bruce Momjian
3e803f7273 Add "isodow" option to EXTRACT() and date_part() where Sunday = 7. 2007-02-19 17:41:39 +00:00
Bruce Momjian
4ebb0cf9c3 Add two new format fields for use with to_char(), to_date() and
to_timestamp():
    - ID for day-of-week
    - IDDD for day-of-year

This makes it possible to convert ISO week dates to and from text
fully represented in either week ('IYYY-IW-ID') or day-of-year
('IYYY-IDDD') format.

I have also added an 'isoyear' field for use with extract / date_part.

Brendan Jurd
2007-02-16 03:39:46 +00:00
Michael Meskes
153affd058 Fixed multibyte handling as reported by <harada.toshi@oss.ntt.co.jp>. 2007-02-11 15:18:17 +00:00
Peter Eisentraut
c138b966d4 Replace useless uses of := by = in makefiles. 2007-02-09 15:56:00 +00:00
Peter Eisentraut
16059d39a0 Replace some strncpy() by strlcpy(). 2007-02-07 00:52:35 +00:00
Michael Meskes
685523c420 Applied Magnus Hagander's patch to take away some compiler warnings. 2007-02-02 09:31:10 +00:00
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