Commit Graph

708 Commits

Author SHA1 Message Date
Michael Meskes
f3c6d592d2 - Fixed segfault due to missing check for variable declaration.
- Added check for multidimensional array usage.
2004-03-04 07:32:02 +00:00
Michael Meskes
fd104c5764 Added partly missing VOLATILE keyword. 2004-03-02 06:45:05 +00:00
Tom Lane
fa96a5e15b Add %option nodefault to all our flex lexers. Fix a couple of rule gaps
exposed thereby.  AFAICT these would not lead to any worse problems than
junk emitted on the backend's stdout, but we should have the option to
catch possible worse errors in future.
2004-02-24 22:06:32 +00:00
Michael Meskes
1f87d79142 - Corrected error handling in PGTYPEStimestamp_from_asc.
- Set pgtypeslib version to 1.2.
2004-02-24 16:07:49 +00:00
Michael Meskes
b4c8dcb294 Fixed incorrect output of indicator structs using the name of the data struct. 2004-02-23 18:14:18 +00:00
Michael Meskes
f8257734e4 Added missing rule for DOUBLE variables. 2004-02-18 08:42:02 +00:00
Michael Meskes
f464ad0bfd - Cleaned up parser a little bit. It does not make sense to allow a
typename to be typedef'ed that cannot be parsed as variable type.
- Allowed some SQL keywords to be used as C variable names.
2004-02-16 07:41:54 +00:00
Michael Meskes
2a545255cf - Allowed some C keywords to be used as SQL column names. 2004-02-15 15:38:20 +00:00
Michael Meskes
a05977edd9 - Added missing braces to array parsing.
- Set ecpg version to 3.1.1.
	- Removed that old debugging output that I forgot the last time.
2004-02-15 13:48:54 +00:00
Tom Lane
0eb6951915 Repair missing inclusions of -lintl for shared libraries. 2004-02-10 07:26:25 +00:00
Tom Lane
b3ead7c045 Fix typo. 2004-01-28 20:43:03 +00:00
Michael Meskes
6d9a81b66f Removed some debugging output. 2004-01-28 09:54:23 +00:00
Michael Meskes
6ccfc4f430 - Issue a warning if a cursor is declared but not opened.
- Fixed prototype for ECPGprepared_statement to not moan about "const char"
- Fixed parsing of nested structures.
- Added option to parse header files.
2004-01-28 09:52:14 +00:00
Michael Meskes
1ef7c5c1e9 Added WHENEVER NOT_FOUND to SELECT/INSERT/UPDATE/DELETE. 2004-01-21 14:09:34 +00:00
Tom Lane
9bd681a522 Repair problem identified by Olivier Prenant: ALTER DATABASE SET search_path
should not be too eager to reject paths involving unknown schemas, since
it can't really tell whether the schemas exist in the target database.
(Also, when reading pg_dumpall output, it could be that the schemas
don't exist yet, but eventually will.)  ALTER USER SET has a similar issue.
So, reduce the normal ERROR to a NOTICE when checking search_path values
for these commands.  Supporting this requires changing the API for GUC
assign_hook functions, which causes the patch to touch a lot of places,
but the changes are conceptually trivial.
2004-01-19 19:04:40 +00:00
Bruce Momjian
5cecb734a7 Fix ecpg test program to properly access int* null indicator. 2004-01-13 01:32:52 +00:00
Neil Conway
192ad63bd7 More janitorial work: remove the explicit casting of NULL literals to a
pointer type when it is not necessary to do so.

For future reference, casting NULL to a pointer type is only necessary
when (a) invoking a function AND either (b) the function has no prototype
OR (c) the function is a varargs function.
2004-01-07 18:56:30 +00:00
Michael Meskes
40417169ba Fixed bug in GRANT OPTION FOR parsing. 2004-01-04 14:49:06 +00:00
Tom Lane
4351f8823d Fix portability bugs: char values passed to <ctype.h> functions must
be cast to unsigned char.  We have learned this the hard way before.
2004-01-04 04:17:01 +00:00
Michael Meskes
21b3c0e0ec Added missing whitespaces to array argument parsing. 2003-12-29 13:53:04 +00:00
Michael Meskes
03caf7649b Fixed segfault in parsing of EXEC SQL SELECT * FROM foo() AS TBL( c int, i int); 2003-12-24 22:04:09 +00:00
Bruce Momjian
0ea4f9c859 Back out:
>  Attached is a patch that addressed all the discussed issues
>  that did not break backward compatability, including the
>  ability to output ISO-8601 compliant intervals by setting
>  datestyle to iso8601basic.
2003-12-21 04:34:36 +00:00
Bruce Momjian
54c8e821b8 In my mind there were two categories of open issues
a) ones that are 100% backward (such as the comment about
     outputting this format)
and
  b) ones that aren't (such as deprecating the current
     postgresql shorthand of
         '1Y1M'::interval = 1 year 1 minute
     in favor of the ISO-8601
         'P1Y1M'::interval = 1 year 1 month.

Attached is a patch that addressed all the discussed issues that
did not break backward compatability, including the ability to
output ISO-8601 compliant intervals by setting datestyle to
iso8601basic.

Interval values can now be written as  ISO 8601 time intervals, using
the "Format with time-unit designators". This format always starts with
the character 'P', followed  by a string of values followed
by single character time-unit designators. A 'T' separates the date and
time parts of the interval.

Ron Mayer
2003-12-20 15:32:55 +00:00
Bruce Momjian
85f51dea1c Supress ecpg thread test if configure didn't enable threads. Fix
tools/thread to run even if configure didn't enable threads because this
test is used before enabling threads for the OS.
2003-12-19 23:29:15 +00:00
Peter Eisentraut
ed8e5143c2 Forgot to change one compatlib.h. 2003-12-18 20:25:58 +00:00
Peter Eisentraut
ad8c09c29c Move Informix compatibility include files out of the way. compatlib.h
was integrated into ecpg_informix.h, the other ones go into their own
subdirectory that is automatically considered by the embedded preprocessor
when in Informix mode.
2003-12-18 18:55:09 +00:00
Michael Meskes
95eea2d89c - Added just another patch by Dave that fixes a reversed order in
variable listing for output variables in cursor definitions
- Fixed incorrect if call in long=>numeric conversion.
2003-12-17 15:23:45 +00:00
Michael Meskes
3819afa759 Added patch by Dave Cramer for array handling in ecpglib. 2003-12-03 08:49:17 +00:00
Bruce Momjian
32abf0e781 Bump all version numbers and version stamps mentioned in RELEASE_CHANGES. 2003-11-30 06:09:54 +00:00
PostgreSQL Daemon
55b113257c make sure the $Id tags are converted to $PostgreSQL as well ... 2003-11-29 22:41:33 +00:00
PostgreSQL Daemon
969685ad44 $Header: -> $PostgreSQL Changes ... 2003-11-29 19:52:15 +00:00
Peter Eisentraut
8878cc4cd7 Rename USE_THREADS to ENABLE_THREAD_SAFETY to avoid name clash with Perl.
Fixes compilation failure with --enable-thread-safety --with-perl and Perl
5.6.1.
2003-11-24 13:16:22 +00:00
Michael Meskes
5032f83082 Fixed typo in create schema parsing. 2003-11-19 13:18:13 +00:00
Michael Meskes
135ecf8d96 Re-added forgotten cache. 2003-11-10 20:28:30 +00:00
Michael Meskes
87758314ca Made sure an internal array is not treated as a user defined one. 2003-11-08 19:46:27 +00:00
Michael Meskes
90e53f0c16 Fixed potentially uninitialized memory bug in compatlib. 2003-11-03 14:44:28 +00:00
Peter Eisentraut
1af403e42d Complete options help and put it in less random order. 2003-11-02 12:55:24 +00:00
Michael Meskes
e6152300f1 If EOF is found inside a string/comment/etc. stop parsing. 2003-10-31 14:10:41 +00:00
Michael Meskes
f590a5ea72 Applied patch by Dave Cramer to fix several bugs in compatlib. 2003-10-30 10:19:30 +00:00
Tom Lane
979b537522 Include -lkrb5 when needed for shlibs depending on libpq. Per report
from Johan Henselmans.
2003-10-28 21:55:58 +00:00
Michael Meskes
0262337ad3 Fixed bug with indicators when storage for the string is dynamically allocated. 2003-10-26 09:50:47 +00:00
Tom Lane
0634c01e3a Add missing semicolon, per Johann Uhrmann.
Avoids warnings from newer bisons.
2003-10-22 16:43:42 +00:00
Tom Lane
7eb67fc98b Cope with platforms that offer LONGLONG_MIN in place of the C99-spec
LLONG_MIN.  One example is AIX, per report from Andreas.
2003-10-21 15:34:34 +00:00
Michael Meskes
3b72087bf6 Install dummy sqlda.h file since this is needed for compatibility. 2003-10-20 12:54:29 +00:00
Michael Meskes
d5353acbc3 Check for both Informix modes when parsing include files. 2003-10-19 13:22:33 +00:00
Michael Meskes
84b35a7f76 Added missing "commit" in test case. 2003-10-12 15:19:46 +00:00
Michael Meskes
163f0b2d48 Removed my debug printf() call from numeric.c 2003-10-08 08:28:57 +00:00
Michael Meskes
cfd992ecba Fixed floating point exception in long=>numeric conversion. 2003-10-07 18:36:46 +00:00
Peter Eisentraut
06e6aa236c Add missing include file. 2003-10-07 08:07:56 +00:00
Michael Meskes
3cda980298 Fixed error handling in Informix compat str to date conversion. 2003-10-07 05:46:56 +00:00
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