Commit Graph

1151 Commits

Author SHA1 Message Date
Michael Meskes
53f93cbb20 Updated parser file to the one generated by the latest version of parse.[awk|pl] from the latest version of gram.y
Some small corrections to test suite.
2008-11-13 11:54:39 +00:00
Michael Meskes
c7f5c7c128 Replaced manually synced preproc.y by the one created by the new script.
Adapted regression test files accordingly.
2008-11-11 11:41:24 +00:00
Michael Meskes
492059daba Move from strcmp to strncmp to be more tolerant for changes to the parser. 2008-11-01 19:53:35 +00:00
Michael Meskes
ef9ed9b6aa Use string component in index structure. 2008-11-01 12:42:14 +00:00
Michael Meskes
e6c7f7c1ad Do not eat memory even in case of an out-of-memory error. 2008-11-01 08:55:21 +00:00
Peter Eisentraut
06735e3256 Unicode escapes in strings and identifiers 2008-10-29 08:04:54 +00:00
Peter Eisentraut
8ecd535169 Add WITH [NO] DATA clause to CREATE TABLE AS, per SQL.
Also, since WITH is now a reserved word, simplify the token merging code to
only deal with WITH_TIME.

by Tom Lane and myself
2008-10-28 14:09:45 +00:00
Peter Eisentraut
0fec77ae88 SQL:2008 syntax CURRENT_CATALOG, CURRENT_SCHEMA, SET CATALOG, SET SCHEMA. 2008-10-27 09:37:47 +00:00
Peter Eisentraut
831abae506 Clean regression.out 2008-10-21 10:51:24 +00:00
Peter Eisentraut
1471e3843d Allow SQL:2008 syntax ALTER TABLE ... ALTER COLUMN ... SET DATA TYPE
alongside our traditional syntax.
2008-10-21 08:38:16 +00:00
Michael Meskes
f346a232ed Fixed parsing of parameters. Added regression test for this. 2008-10-14 09:31:05 +00:00
Michael Meskes
9d3275e59d Fixed "create role" parsing to accept optional "with" argument. 2008-10-10 12:17:18 +00:00
Michael Meskes
059349be0c Synced parser. 2008-10-07 12:43:55 +00:00
Tom Lane
44d5be0e53 Implement SQL-standard WITH clauses, including WITH RECURSIVE.
There are some unimplemented aspects: recursive queries must use UNION ALL
(should allow UNION too), and we don't have SEARCH or CYCLE clauses.
These might or might not get done for 8.4, but even without them it's a
pretty useful feature.

There are also a couple of small loose ends and definitional quibbles,
which I'll send a memo about to pgsql-hackers shortly.  But let's land
the patch now so we can get on with other development.

Yoshiyuki Asaba, with lots of help from Tatsuo Ishii and Tom Lane
2008-10-04 21:56:55 +00:00
Heikki Linnakangas
61d9674988 Make LC_COLLATE and LC_CTYPE database-level settings. Collation and
ctype are now more like encoding, stored in new datcollate and datctype
columns in pg_database.

This is a stripped-down version of Radek Strnad's patch, with further
changes by me.
2008-09-23 09:20:39 +00:00
Peter Eisentraut
90d910866e Add additional rules so that make init-po for ecpg gets up to date flex and
bison output.  Without these, make can sometimes be tempted to invoke its
built-in rules using lex and yacc, which can fail if those commands are not
available.

This was a main cause for the NLS web site breakage.
2008-09-19 13:08:08 +00:00
Tom Lane
76c39cf3be Sigh, I missed checking the ecpg tests ... 2008-09-01 21:42:18 +00:00
Peter Eisentraut
7c31742a07 Remove all traces that suggest that a non-Bison yacc might be supported, and
change build system to use only Bison.  Simplify build rules, make file names
uniform.  Don't build the token table header file where it is not needed.
2008-08-29 13:02:33 +00:00
Michael Meskes
0ba9b565b9 Synced parser. 2008-08-20 14:09:16 +00:00
Michael Meskes
ef0dcf0e5b Fixed incorrect argument handling in SET command if argument is a variable. 2008-08-19 10:40:32 +00:00
Alvaro Herrera
d557f5c00c Add MSVC++ debug libraries to .cvsignore. 2008-07-17 21:16:23 +00:00
Tom Lane
d89737d31c Support "variadic" functions, which can accept a variable number of arguments
so long as all the trailing arguments are of the same (non-array) type.
The function receives them as a single array argument (which is why they
have to all be the same type).

It might be useful to extend this facility to aggregates, but this patch
doesn't do that.

This patch imposes a noticeable slowdown on function lookup --- a follow-on
patch will fix that by adding a redundant column to pg_proc.

Pavel Stehule
2008-07-16 01:30:23 +00:00
Michael Meskes
13c843d085 Synced parser 2008-06-26 08:04:05 +00:00
Michael Meskes
c8e0d68aa5 Added lost sysmbol SQL_SQL to list of allowed variable names. 2008-06-04 12:23:34 +00:00
Michael Meskes
d82e7c84fa Link in keywords file instead of copying it.
Use #define/#ifdef instead of sed to fix include files, this should work on Windows too.
2008-05-21 19:51:01 +00:00
Michael Meskes
763c4866a2 ecpg_keywords.o also depends on preproc.h 2008-05-21 00:26:26 +00:00
Michael Meskes
f7563e9710 Synced parser.
Made ecpg parser use backend provided keyword list.
Changed whenever test so exit value is 0.
2008-05-20 23:17:32 +00:00
Tom Lane
d4b9f44bf9 okay, looks like ecpg/compatlib needs -lintl too.
Per buildfarm results.
2008-05-18 03:24:17 +00:00
Tom Lane
5248e02b50 ecpglib needs to link with libintl if it's in use.
Per buildfarm results.
2008-05-17 20:23:40 +00:00
Andrew Dunstan
e72c98b058 fix ecpg regression tests broken by over-eager adding of $PostgreSQL$ markers 2008-05-17 02:43:16 +00:00
Andrew Dunstan
53972b460c Add $PostgreSQL$ markers to a lot of files that were missing them.
This particular batch was just for *.c and *.h file.

The changes were made with the following 2 commands:

find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o  \( -name '*.[ch]'  \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | while read file ; do head -n 1 < $file | grep -q '^/\*' && echo $file; done | xargs -l sed -i -e '1s/^\// /' -e '1i/*\n * $PostgreSQL:$ \n *'

find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o  \( -name '*.[ch]'  \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | xargs -l sed -i -e '1i/*\n * $PostgreSQL:$ \n */'
2008-05-17 01:28:26 +00:00
Peter Eisentraut
e1bdd07c3c Add localization support to ecpg.
Author: Euler Taveira de Oliveira <euler@timbira.com>
2008-05-16 15:20:04 +00:00
Bruce Momjian
210faf2d5f Fix a few warnings that have crept into CVS HEAD. 2008-05-14 15:16:27 +00:00
Michael Meskes
1fe8d17128 Check for non-existant connection in prepare statement handling.
Do not close files that weren't opened.
2008-05-12 16:29:04 +00:00
Peter Eisentraut
d35c56ed9f Add "%option noinput" to the scanners to avoid compiler warnings. GCC 4.3
began to realize that the input() function isn't used and printed warnings.
2008-05-09 15:36:31 +00:00
Michael Meskes
02b2bc7907 PGTYPEStimestamp_sub should use the values and not the pointers to substract. 2008-04-10 10:43:35 +00:00
Peter Eisentraut
46e76373ec Implement a few changes to how shared libraries and dynamically loadable
modules are built.  Foremost, it creates a solid distinction between these two
types of targets based on what had already been implemented and duplicated in
ad hoc ways before.  Specifically,

- Dynamically loadable modules no longer get a soname.  The numbers previously
set in the makefiles were dummy numbers anyway, and the presence of a soname
upset a few packaging tools, so it is nicer not to have one.

- The cumbersome detour taken on installation (build a libfoo.so.0.0.0 and
then override the rule to install foo.so instead) is removed.

- Lots of duplicated code simplified.
2008-04-07 14:15:58 +00:00
Michael Meskes
fe11719c2e Sorry, copied wrong files. 2008-03-27 08:40:02 +00:00
Michael Meskes
9d7b256eeb - Moved from PQsetdbLogin to PQconnectDB.
- Correctly parse connect options.
- Changed regression tests accordingly.
2008-03-27 07:56:02 +00:00
Michael Meskes
e427aa9080 added ECPGget_PGconn to exports.txt 2008-03-25 12:45:25 +00:00
Michael Meskes
35ea0a9b8d Corrected version number. 2008-03-21 16:10:23 +00:00
Bruce Momjian
fca9fff41b More README src cleanups. 2008-03-21 13:23:29 +00:00
Michael Meskes
f9e083fd30 Added ECPGget_PGconn() function to ecpglib, courtesy of Mike Aubury.
Removed one include file from connect-test1.
2008-03-20 16:29:45 +00:00
Michael Meskes
15364ea09d Changed statement escaping to not escape continuation line markers. 2008-03-20 15:56:59 +00:00
Peter Eisentraut
2a43c4786d Don't need -Wno-error anymore, because flex is no longer producing warnings. 2008-03-18 17:46:23 +00:00
Peter Eisentraut
8c87cc370f Catch all errors in for and while loops in makefiles. Don't ignore any
errors in any commands, including in various clean targets that have so far
been handled inconsistently.  make -i is available to ignore all errors in
a consistent and official way.
2008-03-18 16:24:50 +00:00
Michael Meskes
fb7b1df083 Fixed bug that caused arrays of varchar to be output with incomplete name.
In the process expanded one test case,
2008-03-02 10:54:11 +00:00
Tom Lane
e04fa58dcd Fix unportable usages of tolower(). On signed-char machines, it is necessary
to explicitly cast the output back to char before comparing it to a char
value, else we get the wrong result for high-bit-set characters.  Found by
Rolf Jentsch.  Also, fix several places where <ctype.h> functions were being
called without casting the argument to unsigned char; this is likewise
unportable, but we keep making that mistake :-(.  These found by buildfarm
member salamander, which I will desperately miss if it ever goes belly-up.
2008-03-01 03:26:35 +00:00
Peter Eisentraut
f6f8d61a47 Fix uninstall target. 2008-02-26 13:48:57 +00:00
Peter Eisentraut
a1d5d85747 Refactor the code that creates the shared library export files to appear
only once in Makefile.shlib and not in four copies.
2008-02-26 06:41:24 +00:00
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