Commit Graph

2397 Commits

Author SHA1 Message Date
Michael Meskes ac334e9551 Synced parser and keyword list. 2004-06-20 10:45:47 +00:00
Bruce Momjian 57d2665108 Fix Makefile syntax. Forgot to test this. 2004-06-19 15:14:17 +00:00
Bruce Momjian 3101181e9e Add changes to support threads on Win32 native port at some point in the future. 2004-06-19 04:43:18 +00:00
Bruce Momjian af70d57825 Enable thread safety for win32.mak build of PostgreSQL.
Andreas Pflug
2004-06-19 04:22:17 +00:00
Michael Meskes 5f3edded81 Added patch by ISHIDA Akio to allow indicators in execute statements. 2004-06-17 11:52:25 +00:00
Bruce Momjian eebad1a74f ECPG preprocessor for PostgreSQL 7.4.1, 7.4.2 doubles const,
volatile, static, and register keywords before variables,
declared as VARCHAR.

Sergey N. Yatskevich
2004-06-11 17:32:39 +00:00
Bruce Momjian 6cc4175b25 Attached is a patch that takes care of the PATHSEP issue. I made a more
extensive change then what was suggested. I found the file path.c that
contained a lot of "Unix/Windows" agnostic functions so I added a function
there instead and removed the PATHSEP declaration in exec.c altogether. All
to keep things from scattering all over the code.

I also took the liberty of changing the name of the functions
"first_path_sep" and "last_path_sep". Where I come from (and I'm apparently
not alone given the former macro name PATHSEP), they should be called
"first_dir_sep" and "last_dir_sep". The new function I introduced, that
actually finds path separators, is now the "first_path_sep". The patch
contains changes on all affected places of course.

I also changed the documentation on dynamic_library_path to reflect the
chagnes.

Thomas Hallgren
2004-06-10 22:26:24 +00:00
Bruce Momjian cd8b0fc5f1 Change PGETC to PGSYSCONFDIR and PGLOCALE to PGLOCALEDIR, per Peter. 2004-06-08 13:49:23 +00:00
Bruce Momjian af44cac6ef The attached patch will create a dummy pg_config_paths.h. Additionally,
ENABLE_THREAD_SAFETY is supported by the makefile (but not by the
sources, which need some rework)

Andreas Pflug
2004-06-04 13:30:04 +00:00
Bruce Momjian 3c45d348db init_ssl_system will return 0 on success and -1 on failure, which will
be interpreted just the other way round in initialize_SSL.

Andreas Pflug
2004-06-03 00:13:19 +00:00
Bruce Momjian 1881c8f3c5 Add new Win32 file with adjustments for recent code changes.
Andreas Pflug
2004-06-03 00:11:13 +00:00
Bruce Momjian 6870843339 Add PGETC (for pg_service.conf) and PGLOCALE (for locale dir)
environment variable processing to libpq.

The patch also adds code to our client apps so we set the environment
variable directly based on our binary location, unless it is already
set. This will allow our applications to emit proper locale messages
that are generated in libpq.
2004-06-03 00:07:38 +00:00
Tom Lane a843053e2e Suppress compile warnings on machines where the INT64CONST() decoration
is actually needed.  Per Oliver Elphick.
2004-05-31 18:53:18 +00:00
Tom Lane 8b1ae8fa3f Too few parens for my taste in this macro. 2004-05-31 18:42:40 +00:00
Neil Conway 72b6ad6313 Use the new List API function names throughout the backend, and disable the
list compatibility API by default. While doing this, I decided to keep
the llast() macro around and introduce llast_int() and llast_oid() variants.
2004-05-30 23:40:41 +00:00
Bruce Momjian 97d625dd1c *) inet_(client|server)_(addr|port)() and necessary documentation for
the four functions.


> Also, please justify the temp-related changes.  I was not aware that we
> had any breakage there.

patch-tmp-schema.txt contains the following bits:

*) Changes pg_namespace_aclmask() so that the superuser is always able
to create objects in the temp namespace.
*) Changes pg_namespace_aclmask() so that if this is a temp namespace,
objects are only allowed to be created in the temp namespace if the
user has TEMP privs on the database.  This encompasses all object
creation, not just TEMP tables.
*) InitTempTableNamespace() checks to see if the current user, not the
session user, has access to create a temp namespace.

The first two changes are necessary to support the third change.  Now
it's possible to revoke all temp table privs from non-super users and
limiting all creation of temp tables/schemas via a function that's
executed with elevated privs (security definer).  Before this change,
it was not possible to have a setuid function to create a temp
table/schema if the session user had no TEMP privs.

patch-area-path.txt contains:

*) Can now determine the area of a closed path.


patch-dfmgr.txt contains:

*) Small tweak to add the library path that's being expanded.

I was using $lib/foo.so and couldn't easily figure out what the error
message, "invalid macro name in dynamic library path" meant without
looking through the source code.  With the path in there, at least I
know where to start looking in my config file.

Sean Chittenden
2004-05-26 18:35:51 +00:00
Tom Lane fafd5640d1 Recent commits added created files that weren't getting deleted by
'make clean'.
2004-05-26 17:24:07 +00:00
Bruce Momjian cfbfdc557d This patch implement the TODO [ALTER DATABASE foo OWNER TO bar].
It was necessary to touch in grammar and create a new node to make home
to the new syntax. The command is also supported in E
CPG. Doc updates are attached too. Only superusers can change the owner
of the database. New owners don't need any aditional
privileges.

Euler Taveira de Oliveira
2004-05-26 13:57:04 +00:00
Bruce Momjian f240d37229 Add FRONTEND to ecpglib. 2004-05-25 21:20:44 +00:00
Bruce Momjian 17ff18141c Add exec.c to ecpg library because path.c now uses it. 2004-05-25 17:35:51 +00:00
Bruce Momjian 228897774c Make the locale location relocatable.
Adjust get_*_path functions to be limited to MAXPGPATH.
2004-05-25 01:00:30 +00:00
Bruce Momjian 82695df3b7 Remove a few $filter() calls that were not needed. 2004-05-24 01:01:38 +00:00
Tom Lane add8b70dda Handle inclusion of port modules 'correctly', viz the same way libpq
does it.  Fixes OS X, which needs path.c.  It may be that Win32 needs
some more port modules, but they are easily added.
2004-05-21 21:56:02 +00:00
Tom Lane 13f96c4b6b Put path configuration information into a .h file instead of cluttering
several different module Makefiles with it.  Also, do any adjustment
of installation paths during configure, rather than every time Makefile.global
is read.
2004-05-21 20:56:50 +00:00
Michael Meskes 79c3bf4984 - Fixed DEALLOCATE PREPARE to use correct function call
- Made sure connect statement does not accept single char variable,
  but only strings.
2004-05-21 13:50:12 +00:00
Bruce Momjian 260b513fc3 Add mention of why -lpgport is needed in ecpglib (dllwrap). 2004-05-21 03:12:03 +00:00
Bruce Momjian 928e73ea62 Add -lpgport to ecpglib link only on win32. Other platforms have
problems with it.
2004-05-21 03:10:47 +00:00
Tom Lane 9bfee3adee Revert addition of -lpgport, which breaks the build on platforms that
are sticky about non-PIC code in shared libraries.  Windows will have
to find another solution (probably similar to the way libpq does it).
2004-05-21 00:14:38 +00:00
Bruce Momjian ecc198bd39 Re-add elog() to exec.c, per Tom. 2004-05-19 17:15:21 +00:00
Bruce Momjian eb8c79a129 Win32 needs -lpgport for dll creation of ecpglib. 2004-05-19 05:14:58 +00:00
Bruce Momjian f16874c23d Win32 can't have the same function coming from two library object files,
so we make is_absolute_path a macro so libpq doesn't use path.o.
2004-05-19 04:21:49 +00:00
Bruce Momjian a9fad44372 Move find_my_exec() way up into main.c so it is available to the
timezone code and other places.

Remove elog() calls from find_my_exec;  do fprintf(stderr) instead.  We
can then remove the exec.c handling in the makefile because it doesn't
have to be built to suppress elog calls.
2004-05-18 20:18:59 +00:00
Bruce Momjian 3febb477e6 Reorganize code to allow path-relative installs.
Create new get_* functions to access compiled-in paths and adjust if
relative installs are to be used.

Clean up substitute_libpath_macro() code.
2004-05-17 14:35:34 +00:00
Tom Lane 02409a4813 Propagate enlargeStringInfo() fixes into the equivalent code in
pqexpbuffer.c.  While a client-side failure doesn't seem like a
security issue, it's still a bug.
2004-05-14 00:20:38 +00:00
Bruce Momjian b1ffacddfc Rename find_my_binary/find_other_binary to
find_my_exec/find_other_exec().  Remove passing of progname to these
functions as they can find that out from argv[0], which they already
have.

Make get_progname return const char *, and update all progname variables
to be const char *.
2004-05-12 13:38:49 +00:00
Bruce Momjian 608b85a23c Clean up indenting of Makefile filenames. 2004-05-10 23:09:04 +00:00
Michael Meskes 491dc124bf - Argh, just another bug in adjust_informix.
- Added "extern C" flags for C++ compiler. Hopefully I got that one right.
2004-05-10 13:46:06 +00:00
Michael Meskes 2b55612645 - Added additional test case.
- Fixed bug that reversed string length in typedefs.
- Added portability file to pgtypeslib.
2004-05-07 13:42:49 +00:00
Tom Lane 0bd61548ab Solve the 'Turkish problem' with undesirable locale behavior for case
conversion of basic ASCII letters.  Remove all uses of strcasecmp and
strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp;
remove most but not all direct uses of toupper and tolower in favor of
pg_toupper and pg_tolower.  These functions use the same notions of
case folding already developed for identifier case conversion.  I left
the straight locale-based folding in place for situations where we are
just manipulating user data and not trying to match it to built-in
strings --- for example, the SQL upper() function is still locale
dependent.  Perhaps this will prove not to be what's wanted, but at
the moment we can initdb and pass regression tests in Turkish locale.
2004-05-07 00:24:59 +00:00
Michael Meskes e845adf31f - Fixed bug in adjust_informix that treated arrays as simple variables.
- Synced parser again.
- Synced lexer.
2004-05-05 15:03:04 +00:00
Bruce Momjian 4a73eb5ab1 Minor adjustments to enable public-domain timezone library to be called
from our code.
2004-04-30 04:14:06 +00:00
Michael Meskes d51d870f9e Synced parser and keyword list. 2004-04-29 14:08:10 +00:00
Bruce Momjian efc34e29a2 Add $(X) for cross-compiling. Seems the mingw compiler running on
FreeBSD doesn't add .EXE to links.

Michiel Ephraim
2004-04-26 17:40:48 +00:00
Bruce Momjian 45fbab2933 Make thread flags CFLAGS, not CPPFLAGS. 2004-04-25 20:57:32 +00:00
Bruce Momjian 7a66015e98 Add new auto-detection of thread flags.
Allow additional thread flags to be added via port templates.

Change thread flag names to PTHREAD_CFLAGS and PTHREAD_LIBS to match new
configure script.
2004-04-23 18:15:55 +00:00
Michael Meskes 77528c9bd7 Fixed memory misusage in variable handling. 2004-04-23 06:17:14 +00:00
PostgreSQL Daemon 41fa9e9bae Remove all of the libpgtcl and pgtclsh files, including all references to
them within the various makefiles

with_tcl is still required for the src/pl/tcl language
2004-04-20 00:33:53 +00:00
Bruce Momjian 31338352bd * Most changes are to fix warnings issued when compiling win32
* removed a few redundant defines
* get_user_name safe under win32
* rationalized pipe read EOF for win32 (UPDATED PATCH USED)
* changed all backend instances of sleep() to pg_usleep

    - except for the SLEEP_ON_ASSERT in assert.c, as it would exceed a
32-bit long [Note to patcher: If a SLEEP_ON_ASSERT of 2000 seconds is
acceptable, please replace with pg_usleep(2000000000L)]

I added a comment to that part of the code:

    /*
     *  It would be nice to use pg_usleep() here, but only does 2000 sec
     *  or 33 minutes, which seems too short.
     */
    sleep(1000000);

Claudio Natoli
2004-04-19 17:42:59 +00:00
Peter Eisentraut fc43abaccf Translation updates 2004-04-05 09:13:43 +00:00
Bruce Momjian 422d4819ee Corrects issues recently posted by Dann Corbit, allowing libpq/psql to
be built under VC++. Moves a pgstat win32 #def to port.h

Claudio Natoli
2004-04-05 03:16:21 +00:00