Commit Graph

708 Commits

Author SHA1 Message Date
Michael Meskes
aeb1f6478e - Fixed constant listing in execute using clause.
- Fixed typo in ecpg for Informix dec_t type.
- Fixed precision handling in Informix compat funxtions.
2003-10-06 06:44:55 +00:00
Michael Meskes
8e6b74e4fd Fixed bug in day of week processing. 2003-10-05 11:12:00 +00:00
Peter Eisentraut
4cb67993a7 Format help message internally consistent. 2003-10-04 01:06:38 +00:00
Tom Lane
3b4c142030 Remove assorted compilation failures introduced by latest ecpg changes.
Also remove -g, which has no business in CPPFLAGS in the first place,
let alone being hardwired there by a sub-Makefile.
2003-10-03 17:04:48 +00:00
Michael Meskes
1bd5e054ed Hide Informix datatypes. They are not seen by our built process anymore. 2003-10-03 10:07:28 +00:00
Tom Lane
cd75f94daf Adjust Darwin build to use the default 'two level namespace' linking
method.  Fix a number of places where shared libraries were linked without
mentioning all the libraries they depend on; the Darwin and AIX ports
are known to require this, and it doesn't seem to hurt any other supported
platforms.  (Hence, remove code in pl/tcl makefile that tried to avoid
mentioning other libs if not needed.)
2003-09-27 19:35:32 +00:00
Bruce Momjian
227dd9b427 Rename thread compile flag. Move thread test program to tools/thread,
and improve tests.
2003-09-27 15:32:48 +00:00
Michael Meskes
e11136e4a5 Fixed segfault after error in parsing precision argument. 2003-09-26 15:16:29 +00:00
Bruce Momjian
266664fcd2 Fix creation of temporary sequences in ecpg, per report from Edmund Bacon. 2003-09-24 19:05:32 +00:00
Michael Meskes
5a5f0a6168 - Changed struct definition handling so "struct foo {}" always gets defined. 2003-09-23 12:56:35 +00:00
Michael Meskes
22c0b1f0f4 - Fixed order mismatch in processing "using" arguments.
- Fixed some minor things in test cases.
- Use defines for Informix error codes.
2003-09-22 13:19:39 +00:00
Tom Lane
11b274f00f Fix some ill-considered ifdefs, per report from Hans-JÏrgen SchÎnig. 2003-09-21 17:42:22 +00:00
Michael Meskes
3438065eed - Renamed my own strndup() function because of a name clash. 2003-09-20 09:10:50 +00:00
Michael Meskes
f604b39c2f - Applied some bug fixing patches by Dave Cramer <dave@fastcrypt.com>.
- Added protecting defines to include files.
2003-09-20 09:10:09 +00:00
Michael Meskes
580e08a98b One small typo in preprocessor. 2003-09-19 14:13:16 +00:00
Michael Meskes
df974272ec Removed superfluous return statement in get_data. 2003-09-19 14:06:21 +00:00
Michael Meskes
723a9bde33 - Accept output variables for FETCH in DECLARE statement.
- Synced parser.
- Allowed C variables to carry the name of prepared statements.
- Added Informix handling of datatype converion errors.
2003-09-18 13:12:23 +00:00
Tom Lane
fc73264005 I don't care whether it's informix-compatible or not: #defining a word
like 'date' in a public header file is a damn fool idea.
2003-09-16 04:32:28 +00:00
Michael Meskes
573f4500a3 Some uppercase type definitions were left. 2003-09-10 18:03:08 +00:00
Michael Meskes
fcdf0e22fc - Added Dave patch for Informix handling of numeric/int conversion.
- Changed all new datatypes to lowercase.
- Fixed rounding bug in numerical types.
2003-09-09 10:46:42 +00:00
Bruce Momjian
1709fde56a Improve prototype casting for thread calls. 2003-09-05 01:53:41 +00:00
Michael Meskes
05f4b03b23 Fixed two bugs in pgtypes library. 2003-09-01 12:37:40 +00:00
Michael Meskes
47a4e2ed1c Fixed connect statement with username in variable. 2003-08-26 16:09:02 +00:00
Michael Meskes
4b02f3c4eb Synced parser and fixed a bug in error output to log file. 2003-08-25 13:44:00 +00:00
Peter Eisentraut
c3664c0c00 Add macros for error result fields to libpq. 2003-08-24 18:36:38 +00:00
Peter Eisentraut
fbf1fd2650 Fix null checking of type decimal datums without indicator in Informix
mode.

from Dave Cramer
2003-08-08 13:17:58 +00:00
Peter Eisentraut
e39bc695d6 Be a little bit more careful about using sqlstate, in case libpq returned
NULL for it.
2003-08-08 13:16:20 +00:00
Peter Eisentraut
acbef53d1f Remove postgres_ext.h inclusion -- not necessary. 2003-08-08 10:43:54 +00:00
Bruce Momjian
e060701f51 Clean up function header. 2003-08-07 23:43:32 +00:00
Bruce Momjian
d8295603c8 Make table column type TEXT. 2003-08-07 16:37:31 +00:00
Bruce Momjian
697f9f09ed Add iteration option to thread test program. 2003-08-07 16:14:03 +00:00
Bruce Momjian
00c11039d4 Update ecpg thread testing program to be more automated. 2003-08-07 05:12:00 +00:00
Bruce Momjian
042221db83 Include postgres_ext.h instead of postgres_fe.h. This allows ecpg
output C files to proper compile again.
2003-08-07 04:44:26 +00:00
Bruce Momjian
df5a58811b Add -lm for ecpg/pgtypeslib/Makefile link so -lm isn't required for ecpg
compiles.
2003-08-07 04:03:18 +00:00
Tom Lane
a6672880e1 Fix compiler-detected problem for Alphas: it seems strlen returns
something wider than int on that platform.  Also, remove bogus
assumption that sizeof("INT_MAX") has something to do with the maximum
number of digits in an int.
2003-08-06 15:54:06 +00:00
Bruce Momjian
149f01c4d4 Add ecpg thread testing file. 2003-08-06 02:19:51 +00:00
Bruce Momjian
f3c3deb7d0 Update copyrights to 2003. 2003-08-04 02:40:20 +00:00
Bruce Momjian
089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
Michael Meskes
25b10fc1e6 Missed two places to replace union member. 2003-08-01 18:19:03 +00:00
Tom Lane
6520c666c1 Fix a few of the more blatantly unportable constructs in this file. 2003-08-01 18:10:43 +00:00
Tom Lane
3a1ed8761f Fix inconsistent static-vs-not-static declarations. 2003-08-01 18:03:57 +00:00
Tom Lane
38a412ec39 Fix compile warning. 2003-08-01 16:46:06 +00:00
Peter Eisentraut
7843a44839 Use only two-part shared library version numbers, for better portability
and consistency.
2003-08-01 16:18:04 +00:00
Peter Eisentraut
4f7df90db0 Make ecpg SQLSTATE-aware. Map existing SQLCODE assignments to SQLSTATEs,
rather than parsing the message.  Add some documentation about embedded
SQL.
2003-08-01 13:53:36 +00:00
Michael Meskes
0584370728 Added missing TO keyword. 2003-08-01 11:25:55 +00:00
Michael Meskes
7a9c074cba - Added some Informix error codes in Informix mode.
- Added just another pgtypeslib function.
2003-08-01 08:21:04 +00:00
Michael Meskes
6a0d6d0060 Added explicit casts for date/interval/timestamp. 2003-07-25 16:10:26 +00:00
Michael Meskes
4c4a667f4d Applied Peter's patch to use yyless instead of my string_unput function. 2003-07-25 05:42:27 +00:00
Michael Meskes
060229b9d7 Fixed mdy functions to use correct offset. 2003-07-24 08:41:07 +00:00
Michael Meskes
45d8f61ff2 Added more compat stuff ot the parser. 2003-07-18 14:32:56 +00:00
Tom Lane
157e17e20d Add an upper limit to IS_VALID_JULIAN() to defend against overflow in
date2j().  This ensures we give reasonable errors instead of bizarre
behavior for input dates far in the future.
2003-07-17 22:28:42 +00:00
Michael Meskes
c15b66ef82 Allow blanks at the end of numerical values. 2003-07-17 11:27:55 +00:00
Michael Meskes
7d32551a81 Fixed some bugs in Informix compat functions. 2003-07-17 07:54:29 +00:00
Tom Lane
764f72dc82 Make EXTRACT(TIMEZONE) and SET/SHOW TIMEZONE follow the SQL convention
for the sign of timezone offsets, ie, positive is east from UTC.  These
were previously out of step with other operations that accept or show
timezones, such as I/O of timestamptz values.
2003-07-17 00:55:37 +00:00
Michael Meskes
96be4b28a3 Applied patch to fix two compatibility functions. 2003-07-16 13:18:51 +00:00
Michael Meskes
42df5e311f Started to create different error codes for different backend messages. 2003-07-15 12:38:38 +00:00
Michael Meskes
6eb27d16b6 Missed one rule in syncinc preproc.y which resulted in reduce/reduce conflicts. 2003-07-14 12:18:25 +00:00
Michael Meskes
e895eb197d - Synced preproc.y with gram.y
- Init sqlca in ECPGprepare().
        - Added CLOSE DATABASE for Informix compatibility.
2003-07-14 10:16:45 +00:00
Michael Meskes
18936ef372 Argh! Missed one file. 2003-07-09 14:53:18 +00:00
Michael Meskes
abfa8ae54f Fixed some Informix compat functions so they handle NULL resp. indicators better. 2003-07-09 13:49:38 +00:00
Michael Meskes
f207718b0c More informix fixes. 2003-07-08 12:11:35 +00:00
Michael Meskes
fee6fd7f65 Fix segfault in connect in informix mode. 2003-07-08 07:13:48 +00:00
Michael Meskes
91d60637cf "char *" of course is not the same as "char []". So I had to fix the way ecpg treated the second one. 2003-07-07 12:15:33 +00:00
Tom Lane
841b4a2d55 tm2timestamp should return -1, not elog, on overflow. (In the backend
this is merely an API inconsistency, but in ecpg it's fatal.)  Also,
fix misconceived overflow test in HAVE_INT64_TIMESTAMP case.
2003-07-04 18:21:14 +00:00
Tom Lane
3abbce39d5 Fix missing code for HAVE_INT64_TIMESTAMP. 2003-07-04 18:15:10 +00:00
Tom Lane
efbbd107c7 Add #include <limits.h> (re-add lost change from Wednesday). 2003-07-04 16:28:03 +00:00
Michael Meskes
c7fddd3072 date, interval and timestamp data should be quoted. 2003-07-04 12:00:52 +00:00
Michael Meskes
23e4fc18a7 Fixed informix behaviour for select without into. 2003-07-04 11:30:48 +00:00
Michael Meskes
7b1885bf98 Fixed initialization bug and added postgres_fe.h to pgtypeslib. 2003-07-02 07:57:36 +00:00
Bruce Momjian
cc3002313f Fix ecpg typo --- change ;; to ;. 2003-07-01 19:58:23 +00:00
Michael Meskes
2bdd2e5dcf Use ISO dates in pgtypeslib by default.
Applied patch by Philip Yarra to fix some thread issues.
Added a new data type "decimal" which is mostly the same as our
	"numeric" but uses a fixed length array to store the digits. This is
	for compatibility with Informix and maybe others.
2003-07-01 12:40:52 +00:00
Michael Meskes
cf883ea95c - Made sure Informix style decimal vars are initialized. They use a
fixed amount of digits and not an allocated one. So we have to work
  around. PostgreSQL numeric type remains the same.
- In INFORMIX_SE mode with autcommit set, make all cursors be "with
  hold". Is this really they way SE behaves?
2003-06-29 16:52:58 +00:00
Michael Meskes
9aeb1eff24 Just another sync. 2003-06-29 09:25:19 +00:00
Tom Lane
b3c0551eda Create real array comparison functions (that use the element datatype's
comparison functions), replacing the highly bogus bitwise array_eq.  Create
a btree index opclass for ANYARRAY --- it is now possible to create indexes
on array columns.
Arrange to cache the results of catalog lookups across multiple array
operations, instead of repeating the lookups on every call.
Add string_to_array and array_to_string functions.
Remove singleton_array, array_accum, array_assign, and array_subscript
functions, since these were for proof-of-concept and not intended to become
supported functions.
Minor adjustments to behavior in some corner cases with empty or
zero-dimensional arrays.

Joe Conway (with some editorializing by Tom Lane).
2003-06-27 00:33:26 +00:00
Michael Meskes
4505653e54 Added just another compatibility level for Informix. 2003-06-26 11:37:05 +00:00
Bruce Momjian
b143210639 Wrap LONG_LONG_MIN redfinition around HAVE_LONG_LONG_INT_64. 2003-06-26 01:45:04 +00:00
Bruce Momjian
095a0c83d5 Fix compile problem for missing LONG_LONG_MIN on BSD/OS. 2003-06-26 01:33:23 +00:00
Bruce Momjian
111d8e522b Back out array mega-patch.
Joe Conway
2003-06-25 21:30:34 +00:00
Michael Meskes
6f30d5665c The remaining files ... 2003-06-25 17:55:50 +00:00
Michael Meskes
8d8b9401b8 remove including of postgres_fe.h 2003-06-25 16:12:27 +00:00
Michael Meskes
54fae9c20a Some systems need another header file included. 2003-06-25 11:51:18 +00:00
Michael Meskes
fd3ca524eb Implemented Informix special way to treat NULLs, removed warnings, synced. 2003-06-25 10:44:21 +00:00
Bruce Momjian
46bf651480 Array mega-patch.
Joe Conway
2003-06-24 23:14:49 +00:00
Bruce Momjian
975674a952 Add -L../ecpglib -lecpg for Cygwin compile. 2003-06-24 14:45:46 +00:00
Michael Meskes
36fe7577f8 Added missing terminating '\0' char for data put into char *. 2003-06-22 11:00:48 +00:00
Michael Meskes
94b59faeb7 Synced with backend. 2003-06-20 15:16:06 +00:00
Michael Meskes
2cbaaee6c3 Just another Informix compatibility change. They uses "free" for cursors as wellafter closing them. 2003-06-20 13:36:34 +00:00
Michael Meskes
cf5ec3d12b Sorry, missed a file. 2003-06-20 12:01:46 +00:00
Michael Meskes
abd310a3b1 Allow constants in using clauses. 2003-06-20 12:00:59 +00:00
Michael Meskes
8902aaaa6c Fixed fetch into char * and added missing prototype for an Informix function. 2003-06-19 09:52:11 +00:00
Michael Meskes
8a2aa79fee Fixed several more parsing bugs. 2003-06-17 07:28:22 +00:00
Michael Meskes
76924b5d94 Fixed two small bugs. 2003-06-16 16:58:11 +00:00
Michael Meskes
a0f29e3afd Typo in version number. 2003-06-15 12:06:50 +00:00
Michael Meskes
86a8331935 Some minor changes for new version numbering. 2003-06-15 11:10:09 +00:00
Bruce Momjian
a64927f995 Ecpg cleanups for prototypes. 2003-06-15 04:56:45 +00:00
Bruce Momjian
4f70680177 Make ecpg thread safe.
Lee Kindness
2003-06-15 04:07:58 +00:00
Michael Meskes
26188e8c17 - Enable FETCH without INTO.
- Compatibility functions for INFORMIX handling of DECLARE statement.
2003-06-13 10:50:58 +00:00
Michael Meskes
b4117d8b1b Install all header files. 2003-06-12 12:52:24 +00:00
Michael Meskes
1ca0b6d047 Make sure a variable is no longer referenced when it is removed.
Fixed counting bug in parsing "->" operator.
Removed that silly debugging function I accidently committed last night.
2003-06-11 06:39:13 +00:00
Michael Meskes
65058fcf2b Fixed some bugs. 2003-06-10 17:46:43 +00:00
Michael Meskes
45eebaf822 Fixed segfault in forward definition parsing. 2003-06-02 15:38:02 +00:00
Michael Meskes
776d530924 Create a real prototype function for describe. 2003-05-30 13:22:02 +00:00
Michael Meskes
a0fed291dc Sync and some minor cleanup/fixing work plus an EXEC SQL DESCRIBE prototype. 2003-05-30 08:39:01 +00:00
Michael Meskes
196d0dd10b Changed variable parsing so struct[n].attr works. 2003-05-29 13:59:26 +00:00
Michael Meskes
bbe9902223 Parse forward definiton of structs. 2003-05-29 12:00:22 +00:00
Michael Meskes
e185583a37 Allow input from stdin and output to stdout. 2003-05-27 14:36:00 +00:00
Michael Meskes
677844560f Fixed incorrect output for some structs. 2003-05-27 11:31:52 +00:00
Michael Meskes
813d9960d2 Forgot these. 2003-05-23 15:22:38 +00:00
Michael Meskes
d258fb91cf ecpg now accepts array elements as arguments. 2003-05-23 15:19:36 +00:00
Peter Eisentraut
6fabec242d Fix compilation on Cygwin. 2003-05-22 17:20:44 +00:00
Michael Meskes
dbd55d3a5b Fixed segfault when detecting undefined cursor. 2003-05-22 17:09:00 +00:00
Michael Meskes
d03a067ba0 ecpg now recognizes named structs/unions. So you don't have to list the whole definition everytime you declare a variable anymore. 2003-05-22 07:58:45 +00:00
Michael Meskes
dc554458ad Reversed my incorrect fix. 2003-05-20 11:05:27 +00:00
Michael Meskes
08d7e1c20e Fixed exec sql ifdef command. 2003-05-19 07:19:57 +00:00
Michael Meskes
3d41da50f7 Made variable type double work again. 2003-05-16 11:30:09 +00:00
Michael Meskes
7e684fad02 Fixed incorrect include and another typo. Sorry, the include did not create a warning/error/problem on my machine, so I didn't notice it. 2003-05-16 09:42:56 +00:00
Bruce Momjian
c42581eba3 Allow interfaces to compile under MingGW/Win32 by adding _P to symbols
in ecpg.
2003-05-16 04:59:24 +00:00
Michael Meskes
4e1ed3da9b - Added more compatibility functions.
- Accept CPP defines for type definitions.
	- Do not parse system include files automatically for Informix mode
2003-05-14 14:37:36 +00:00
Michael Meskes
72f311b86a Fixed order of include file search path. 2003-05-13 11:29:14 +00:00
Bruce Momjian
cb8b1299a3 Add Makefile rules for new crypt/rint() /port functions. Add include
for rint prototype.
2003-05-10 02:05:50 +00:00
Bruce Momjian
0afe5417d7 Add rint() to /port, remove from qnx/. 2003-05-09 16:26:29 +00:00
Michael Meskes
299fbb4b37 Added rfmtlong compatibility function. 2003-05-06 09:48:25 +00:00
Michael Meskes
f7d836212a Fixed double definition of ecpg_compat_mode. 2003-05-02 14:43:25 +00:00
Michael Meskes
9e9d8d54e3 Added an option to force ecpg to also parse files includes via '#include' and some more Informix stuff. 2003-05-01 17:16:57 +00:00
Bruce Momjian
4d4953fc41 Make Win32 tests to match existing Cygwin tests, where appropriate. 2003-04-18 01:03:42 +00:00
Tom Lane
1719fd55d3 Fix some problems exposed by building outside the source tree. 2003-04-16 05:23:55 +00:00
Michael Meskes
76b45c9842 Informix fixes. 2003-04-10 13:06:57 +00:00
Tom Lane
6fb5115850 Get rid of inappropriate flags in CPPFLAGS override --- these break
non-gcc compilers, and they would never belong in CPPFLAGS anyway.
2003-04-08 17:09:51 +00:00
Michael Meskes
a50f285d8d Added some more informix compatibility functions. 2003-04-08 12:34:25 +00:00
Bruce Momjian
d46e643822 Add Win32 path handling for / vs. \ and drive letters. 2003-04-04 20:42:13 +00:00
Bruce Momjian
cdbd298b3a Add prototype for toupper/tolower(). 2003-04-03 05:25:41 +00:00
Michael Meskes
7b85b730f5 More patches for informix compatibility. 2003-04-01 14:37:25 +00:00
Michael Meskes
5e37f16be0 Forgot two new files and one that was moved. 2003-03-30 13:26:09 +00:00
Michael Meskes
999f12982e Moved Informix stuff to its own compat library. Interval datetype is now fully functional. 2003-03-30 11:48:19 +00:00
Bruce Momjian
15b9e2c5ff Add <stdlib> to add calloc() prototype. 2003-03-27 17:25:34 +00:00
Michael Meskes
89508a8492 More changes to pgtypeslib and set optimization to -O1. 2003-03-27 14:29:17 +00:00
Bruce Momjian
f1792b932c Use PQfreemem() consistently, and document its use for Notify.
Keep PQfreeNotify() around for binary compatibility.
2003-03-25 02:44:36 +00:00
Bruce Momjian
8f5fb5f24e Remove ecpg #warning with approval from Michael. 2003-03-22 19:48:41 +00:00
Bruce Momjian
268bbf430f Add missing #include for calloc in ecpg. 2003-03-22 17:12:23 +00:00
Michael Meskes
b8f7d3d0b6 Do not free prepares statements at the end of a transaction. 2003-03-21 15:31:04 +00:00
Michael Meskes
524e9d62a7 Changes to the parser to accept new datatypes. 2003-03-21 14:17:47 +00:00
Michael Meskes
2e6f97560a Started adding date and timestamp. 2003-03-20 15:56:50 +00:00
Peter Eisentraut
28efaf3ccd Avoid mysterious warning about possibly uninitialized variable. 2003-03-19 16:05:41 +00:00
Michael Meskes
6fad73ed45 Some bugfixes for numerical library. 2003-03-18 10:46:39 +00:00
Michael Meskes
bb3730893b Forgot some files... 2003-03-16 10:49:51 +00:00
Michael Meskes
a4f25b6a9c Started working on a seperate pgtypes library. First test work. PLEASE test compilation on iother systems. 2003-03-16 10:42:54 +00:00
Tom Lane
e4704001ea This patch fixes a bunch of spelling mistakes in comments throughout the
PostgreSQL source code.

Neil Conway
2003-03-10 22:28:22 +00:00
Michael Meskes
aedd189a5c Allow SET CONNECTION to be followed by connection object without leading "TO" or "=".
Allow whenever statement to list function without parameters.
2003-02-25 15:58:03 +00:00
Michael Meskes
03829995cd Forgot to commit Makefile change. 2003-02-21 15:19:18 +00:00
Michael Meskes
d5740d7e26 Added DATABASE command as alias to CONNECT TO. 2003-02-19 12:36:39 +00:00