Commit Graph

1884 Commits

Author SHA1 Message Date
Bruce Momjian 85383214ea Rename backendbin to backend_exec in initdb.c. 2004-05-17 13:17:29 +00:00
Bruce Momjian 9f944f0443 Adjust find_my_exec/find_other_exec() so that the return parameter is
last, not first.  This fits our style better.
2004-05-14 17:04:48 +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 fda15b351a As part of the work for making relocatable installs, I have re-factored
all the code that looks for other binaries.  I move FindExec into
port/exec.c (and renamed it to find_my_binary()).  I also added
find_other_binary that looks for another binary in the same directory as
the calling program, and checks the version string.

The only behavior change was that initdb and pg_dump would look in the
hard-coded bindir directory if it can't find the requested binary in the
same directory as the caller.  The new code throws an error.  The old
behavior seemed too error prone for version mismatches.
2004-05-11 21:57:15 +00:00
Bruce Momjian c50faf944d Add variables names to static prototypes in initdb.c. 2004-05-10 20:51:58 +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
Tom Lane 9e16195f3f Second try at a portable unsetenv(). 2004-05-05 21:18:29 +00:00
Tom Lane c7007d1848 Use a more portable technique for unsetting environment variables,
and unset PGCLIENTENCODING to prevent backend from dying if it's set
to something incompatible with the -E option.
2004-05-05 16:09:31 +00:00
Bruce Momjian 3363b847ec Set std error to no buffering on Win32. 2004-05-02 04:25:45 +00:00
Bruce Momjian 04d426ba70 Allow build of timezone database on unix. 2004-04-30 20:01:39 +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
Dennis Bjorklund 9d8b414722 Translation updates 2004-04-26 06:33:10 +00:00
Neil Conway 0fa2afa93a Make psql's \d+ command indicate whether the table in question
contains OIDs. Also, minor documentation improvements to the
psql reference page.
2004-04-22 17:38:16 +00:00
Bruce Momjian b3bc93a4b7 Rename global psql startup file to psqlrc.sample. 2004-04-22 14:34:38 +00:00
Bruce Momjian 65b020bd61 Fix filename mention in psqlrc.sample file. 2004-04-22 14:33:49 +00:00
Bruce Momjian ec7c4c1b66 Please find attached a small patch so that "pg_restore" ignores some sql
errors. This is the second submission, which integrates Tom comments about
localisation and exit code. I also added some comments about one sql
command which is not ignored.

Fabien COELHO
2004-04-22 02:39:10 +00:00
Bruce Momjian be6bbcef56 Add global psql config file, psql.rc.sample. 2004-04-22 01:53:37 +00:00
Bruce Momjian 49d3d9cf40 Change COPY CSV keyword to be:
FORCE QUOTE to force quotes
	FORCE NOT NULL to quote null input values
2004-04-21 00:34:18 +00:00
Bruce Momjian 6949fc0269 Remove pg_encoding. Not needed anymore since we have an initdb in C. 2004-04-20 00:40:06 +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
Bruce Momjian 862b20b382 Complete TODO item:
o -Allow dump/load of CSV format

This adds new keywords to COPY and \copy:

        CSV - enable CSV mode (comma separated variable)
        QUOTE - specify quote character
        ESCAPE - specify escape character
        FORCE - force quoting of specified column
	LITERAL - suppress null comparison for columns

Doc changes included.  Regression updates coming from Andrew.
2004-04-19 17:22:31 +00:00
Peter Eisentraut 0117ed7d4c Translation updates 2004-04-15 08:15:09 +00:00
Peter Eisentraut a45f9e4e52 Translation updates 2004-04-15 08:04:05 +00:00
Bruce Momjian abdabeb995 Change psql \copy stdin/stdout to read from command input/output.
Add pstdin/pstdout to read from psql's stdin/stdout.

BACKWARD INCOMPATIBLE CHANGE
2004-04-12 15:58:52 +00:00
Dennis Bjorklund 0469e9e086 Translation updates 2004-04-09 05:54:01 +00:00
Bruce Momjian 5e9f4d26bc Add CLUSTER tag to psql \d display. 2004-04-06 04:05:17 +00:00
Peter Eisentraut 49c8d08bc8 New translation 2004-04-05 09:34:11 +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
Bruce Momjian 6165bbab8c Remove 'syslog' GUC variable, and add more logical 'log_destination'
variable to control logoutput location on Unix and Win32.

Magnus Hagander
2004-04-05 03:02:11 +00:00
Dennis Bjorklund 94d8da8fec Translation updates 2004-04-02 13:47:56 +00:00
Dennis Bjorklund 03f0604643 Translation updates 2004-04-02 13:42:26 +00:00
Bruce Momjian 4f0d027e7d Add comment about psql \s (history display):
/* This scrolls off the screen when using /dev/tty */
2004-03-27 18:01:40 +00:00
Tom Lane 8899a2aba9 Replace max_expr_depth parameter with a max_stack_depth parameter that
is measured in kilobytes and checked against actual physical execution
stack depth, as per my proposal of 30-Dec.  This gives us a fairly
bulletproof defense against crashing due to runaway recursive functions.
2004-03-24 22:40:29 +00:00
Bruce Momjian 46c3e29b8e >>Also, what is the default connection mode of psql? It should probably be
>>equivalent to "-h localhost", shouldn't it?
>>
>>
>
>Now that is something I had not thought of.  Seems we can assume a Win32
>psql can never use unix domain sockets, so defaulting that to localhost
>is a good solution too.

Andrew Dunstan
2004-03-24 03:10:29 +00:00
Bruce Momjian f23cce73b3 Use the new GUC variable default_with_oids in pg_dump, rather than using
WITH/WITHOUT OIDS in dump files.  This makes dump files more portable.

I have updated the pg_dump version so old binary dumps will load fine.

Pre-7.5 dumps use WITHOUT OIDS in SQL were needed, so they should be
fine.
2004-03-24 03:06:08 +00:00
Tom Lane f862c42009 Use dollar-quoting for function bodies, unless disabled with
--disable-dollar-quoting.

Andrew Dunstan
2004-03-23 22:06:08 +00:00
Tom Lane 2e45c143ef Replace the virtual_host and tcpip_socket parameters with a unified
listen_addresses parameter, as per recent discussion.  The default behavior
is now to listen on localhost, which eliminates the need for the -i
postmaster switch in many scenarios.

Andrew Dunstan
2004-03-23 01:23:48 +00:00
Tom Lane 6b198d61f8 Add missing extern for optind. 2004-03-22 16:46:28 +00:00
Tom Lane d81cd7032e Standardize output buffer size and display format for strftime;
followup to complaint from Korean User's Group.
2004-03-22 15:34:22 +00:00
Bruce Momjian 3ceda5eab3 I just noticed that \dp outputs "Table" to indicate relations (tables,
sequences and views).  This patch allows it to handle views and
sequences.

Euler Taveira de Oliveira
2004-03-22 03:38:24 +00:00
Tom Lane f938c2b91b Revise syntax-error reporting behavior to give pleasant results for
errors in internally-generated queries, such as those submitted by
plpgsql functions.  Per recent discussions with Fabien Coelho.
2004-03-21 22:29:11 +00:00
Dennis Bjorklund 94fb33b115 Translation updates 2004-03-21 09:22:18 +00:00
Tom Lane 05649b88c7 Rewrite pg_dump's comment-dumping code to pull over all the comments
in one query, rather than making a separate query for each object that
could have a comment.  This costs relatively little space (a few tens of
K typically) and saves substantial time in databases with many objects.
I find it reduces the runtime of 'pg_dump -s regression' by about a
third.
2004-03-20 20:09:45 +00:00
Tom Lane 0fdc6c4cc0 Create a validator for plpgsql, so that some minimal syntax checking
is done at creation time for plpgsql functions.  Improve createlang and
droplang to support adding/dropping validators for PLs.  Initial steps
towards producing a syntax error position from plpgsql syntax errors
(this part is a work in progress, and will change depending on outcome
of current discussions).
2004-03-19 18:58:07 +00:00
Tatsuo Ishii e8c3205037 Add PQmbdsplen() which returns the "display length" of a character.
Still some works needed:
- UTF-8, MULE_INTERNAL always returns 1
2004-03-15 10:41:26 +00:00
Tom Lane 7665d1bc16 Teach psql to show the location of syntax errors visually, per recent
discussions.  Patch by Fabien Coelho and Tom Lane.  Still needs to be
taught about multi-screen-column kanji characters; Tatsuo has promised
to provide the needed infrastructure for that.
2004-03-14 04:25:18 +00:00
Dennis Bjorklund 9bcaa8e283 Translation updates 2004-03-12 12:38:36 +00:00
Dennis Bjorklund fe6e922136 Translation updates 2004-03-11 15:48:57 +00:00