Commit Graph

1171 Commits

Author SHA1 Message Date
Bruce Momjian 8123d8f150 Here are few more translated messages into Russian
for the PG_DUMP component.

Please apply to </src/bin/pg_dump/ru.po>

Serguei A. Mokhov
2001-10-13 04:25:27 +00:00
Bruce Momjian 78f7ba13cb Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> As you can see, psql reconnect as any user if the password is same as
> foo. Of course this is due to the careless password setting, but I
> think it's better to prompt ANY TIME the user tries to switch to
> another user. Comments?

Yeah, I agree.  Looks like a simple change in dbconnect():

    /*
     * Use old password if no new one given (if you didn't have an old
     * one, fine)
     */
    if (!pwparam && oldconn)
        pwparam = PQpass(oldconn);

to

    /*
     * Use old password (if any) if no new one given and we are
     * reconnecting as same user
     */
    if (!pwparam && oldconn && PQuser(oldconn) && userparam &&
        strcmp(PQuser(oldconn), userparam) == 0)
        pwparam = PQpass(oldconn);

                        regards, tom lane
2001-10-11 16:54:18 +00:00
Bruce Momjian a965750abf While playing around with trying to add foreign keys to the
\d table display in psql, I noticed that tableinfo.triggers
is not used once it is set.

Greg Sabino Mullane
2001-10-06 14:41:17 +00:00
Peter Eisentraut 9110ef4de6 Move psql's zh_TW.po to the right place. 2001-10-05 21:14:35 +00:00
Bruce Momjian ee973be9c2 files attached are Traditional Chinese translations translated
and modified from Simplified Chinese translations for backend,
pgsql, pg_dump and libpq. I've appended their names to zh_TW.po.

forth
2001-10-05 19:05:54 +00:00
Bruce Momjian 453ef3f81f Attached is the updated version of the patch, which matches
on words as opposed to lines, which means that all of the
following work in psql:

\d foo \d bar
\d foo; \d bar
\d foo \d bar;;
\d foo; <space>


This one also uses "true and false" and strips semicolons
for the following backslash commands: \C \c \d \e \i \o \s \z

Greg Sabino Mullane
2001-10-05 19:01:13 +00:00
Tom Lane c24e5ddf5f Don't try to hack pg_description if not superuser. (Really want a
COMMENT ON LARGE OBJECT command instead, but no time for it now.)
Fix some code that would not work with OIDs > 2G.
2001-10-04 22:39:34 +00:00
Bruce Momjian a6020b396b I've just finished the Chinese NLS support(zh_CN part) files
translation,
    the attachement is those four files.
   (.tar.gz file, with the directory, root is $PGSRC).
    Tested on some Linux platform.

Weiping He
2001-10-04 15:44:14 +00:00
Tom Lane fcd2e372a7 Consistently use gcc's __attribute__((format)) to check sprintf-style
format strings wherever possible.  Remarkably, this exercise didn't
turn up any inconsistencies, but it seems a good idea for the future.
2001-10-03 21:58:28 +00:00
Tom Lane 2e5fda7b7e DROP AGGREGATE and COMMENT ON AGGREGATE now accept the expected syntax
'aggname (aggtype)'.  The old syntax 'aggname aggtype' is still accepted
for backwards compatibility.  Fix pg_dump, which was actually broken for
most cases of user-defined aggregates.  Clean up error messages associated
with these commands.
2001-10-03 20:54:22 +00:00
Thomas G. Lockhart af9747c375 Fix up bad indenting in a few places. 2001-10-03 05:23:12 +00:00
Tom Lane 1929a90b69 Change pg_dump to produce CREATE INDEX commands by using the backend's
pg_get_indexdef() function, rather than reaching into the system catalogs
for itself.  This eliminates a fair amount of redundant code.  Also,
since I just changed pg_get_indexdef() to suppress display of default
index opclasses, this will mean that 7.2 and later dumps will not mention
opclasses unless they are non-default opclasses.  Should make life easier
for future index opclass reorganizations.
2001-10-01 21:31:52 +00:00
Bruce Momjian c6f94644a0 These are further fixes for double quotes missing in the various shell
scripts.

Justin Clift
2001-09-30 22:17:51 +00:00
Bruce Momjian 40cd81cff4 This is a simple patch to put double quotes around a few cases in
pg_ctl.sh which were unquoted when inside of [].

Justin Clift
2001-09-29 03:09:32 +00:00
Bruce Momjian 6bbdd7a9e2 sbasename $0 is now basename "$0" 2001-09-22 04:28:12 +00:00
Peter Eisentraut fdf07fe14f For consistency with the rest of PostgreSQL, rename BLOBs to large objects
in messages and documentation.
2001-09-21 21:58:30 +00:00
Tom Lane 196700c372 Add 'reload' option to pg_ctl to send SIGHUP to the postmaster. 2001-09-21 21:10:56 +00:00
Tom Lane c969fed7ec Give VACUUM its own GUC parameter for memory usage, rather than
piggybacking on SortMem.  Add documentation for some recently-added
GUC parameters that had so far escaped it.
2001-09-21 03:32:36 +00:00
Hiroshi Inoue 29481e170f Change FixupBlobXrefs() to take 'lo' type into account. 2001-09-17 02:07:51 +00:00
Peter Eisentraut e648b22ddd Russian translation from Serguei Mokhov 2001-09-16 23:10:16 +00:00
Peter Eisentraut d0a6cf2180 Update from Serguei Mokhov 2001-09-16 23:06:33 +00:00
Peter Eisentraut 264f8f2b6c Install dynamically loadable modules into a private subdirectory
under libdir, for a cleaner separation in the installation layout
and compatibility with binary packaging standards.  Point backend's
default search location there.  The contrib modules are also
installed in the said location, giving them the benefit of the
default search path as well.  No changes in user interface
nevertheless.
2001-09-16 16:11:11 +00:00
Peter Eisentraut 93a9cc8533 Invoke on_exit() with correct number and type of arguments. 2001-09-11 23:08:07 +00:00
Peter Eisentraut 51ba1c5a8c Remove extra space at end of line. 2001-09-10 19:34:18 +00:00
Bruce Momjian be18a49d39 > NOTE: in the command.c in three places there (I believe) is a typo:
>
> "parse error at [the] end of line"
>
> Attached patch also fixes it. I noticed this while editing the po file.
> If I'm wrong, please ignore the command.c.patch. I will revert my translation
> as well then.
>
> --
> Serguei A. Mokhov
2001-09-10 14:51:33 +00:00
Peter Eisentraut c0d4d5473a Make the world somewhat safe for (not from) DELETE FROM pg_shadow;
Assign the fixed user id 1 to the user created by initdb.
A stand-alone backend will always set the user id to 1.
(Consequently, the name of that user is no longer important.)

In stand-alone mode, the user id 1 will have implicit superuser
status, to allow repairs even if there are no users defined.

Print a warning message when starting in stand-alone mode when no
users are defined.

Disallow dropping the current user and session user.

Granting/revoking superuser status also grants/revokes usecatupd.
(Previously, it would never grant it back.  This could lead to "deadlocks".)

CREATE USER and CREATE GROUP will start allocating user ids at 100
(unless explicitly specified), to prevent accidental creation of a
superuser (plus some room for future extensions).
2001-09-08 15:24:00 +00:00
Bruce Momjian 4ab2393729 Update tab completion for \d*. 2001-09-07 01:24:18 +00:00
Tom Lane ee3c51d4f5 Fix a number of places where pg_dump was careless about explicitly
coercing OID literals to OID in its queries.  Depending on the query
and the server version, this could cause failures for OIDs over 2 billion.
2001-09-07 01:11:50 +00:00
Peter Eisentraut 8837164730 Russian translation from Serguei Mokhov 2001-09-06 11:10:47 +00:00
Tatsuo Ishii 227767112c Commit Karel's patch.
-------------------------------------------------------------------
Subject: Re: [PATCHES] encoding names
From: Karel Zak <zakkr@zf.jcu.cz>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: pgsql-patches <pgsql-patches@postgresql.org>
Date: Fri, 31 Aug 2001 17:24:38 +0200

On Thu, Aug 30, 2001 at 01:30:40AM +0200, Peter Eisentraut wrote:
> > 		- convert encoding 'name' to 'id'
>
> I thought we decided not to add functions returning "new" names until we
> know exactly what the new names should be, and pending schema

 Ok, the patch not to add functions.

> better
>
>     ...(): encoding name too long

 Fixed.

 I found new bug in command/variable.c in parse_client_encoding(), nobody
probably never see this error:

if (pg_set_client_encoding(encoding))
{
	elog(ERROR, "Conversion between %s and %s is not supported",
                     value, GetDatabaseEncodingName());
}

because pg_set_client_encoding() returns -1 for error and 0 as true.
It's fixed too.

 IMHO it can be apply.

		Karel
PS:

    * following files are renamed:

src/utils/mb/Unicode/KOI8_to_utf8.map  -->
        src/utils/mb/Unicode/koi8r_to_utf8.map

src/utils/mb/Unicode/WIN_to_utf8.map  -->
        src/utils/mb/Unicode/win1251_to_utf8.map

src/utils/mb/Unicode/utf8_to_KOI8.map -->
        src/utils/mb/Unicode/utf8_to_koi8r.map

src/utils/mb/Unicode/utf8_to_WIN.map -->
        src/utils/mb/Unicode/utf8_to_win1251.map

   * new file:

src/utils/mb/encname.c

   * removed file:

src/utils/mb/common.c

--
 Karel Zak  <zakkr@zf.jcu.cz>
 http://home.zf.jcu.cz/~zakkr/

 C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
2001-09-06 04:57:30 +00:00
Tom Lane 6c91eef7b7 Fix handling of pg_type.typdefault per bug report from Dave Blasby.
If there's anyone out there who's actually using datatype-defined
default values, this will be an incompatible change in behavior ...
but the old behavior was so broken that I doubt anyone was using it.
2001-09-06 02:07:42 +00:00
Bruce Momjian 7e13743299 pg_restore option is {c|t}, not {c|f}. Pointed out by someone on IRC.
"  -F {c|t}                 specify backup file format\n"
2001-09-04 03:20:29 +00:00
Peter Eisentraut daac2d0ce3 Parse the arguments of \connect as SQL identifiers, so that they expose
the expected behavior in mixed-case situations.

bug report from James Pattie, 2001-08-31
2001-09-02 23:52:19 +00:00
Peter Eisentraut 11193c8a20 For INSERTs, one can now tab complete DEFAULT VALUES.
from Liam Stewart
2001-08-30 13:17:03 +00:00
Peter Eisentraut f5944af8ba Include directory rearrangement
Client headers are no longer in a subdirectory, since they have been made
namespace-clean.

Internal libpq headers are in a private subdirectory.

Server headers are in a private subdirectory.  pg_config has a new option
to point there.
2001-08-28 14:20:28 +00:00
Tom Lane 814f40cf43 Use a cursor for fetching data in -d or -D mode, so that pg_dump doesn't
run out of memory with large tables in these modes.  Patch from
Martijn van Oosterhout.
2001-08-27 20:33:07 +00:00
Tom Lane d15a118a21 Quick-hack solution to regproc/oid issue was not the right solution. 2001-08-27 01:09:59 +00:00
Tom Lane ceca2a7d14 Un-break pg_dump --- pg_class.indproc is now regproc not oid, which
for some reason displays a zero oid differently.  Possibly we should
revert that schema change, but it's easy to make pg_dump accept both
spellings so I'll do that for now.
2001-08-27 00:44:40 +00:00
Tom Lane bc7d37a525 Transaction IDs wrap around, per my proposal of 13-Aug-01. More
documentation to come, but the code is all here.  initdb forced.
2001-08-26 16:56:03 +00:00
Bruce Momjian e87a5ed1e0 Add single-letter encryption options for createuser. Update createuser --help. 2001-08-26 04:19:46 +00:00
Bruce Momjian 5863d541ae Put createuser ENCRYPTED/UNENCRYPTED in the proper place in the query. 2001-08-26 03:46:58 +00:00
Tom Lane 2589735da0 Replace implementation of pg_log as a relation accessed through the
buffer manager with 'pg_clog', a specialized access method modeled
on pg_xlog.  This simplifies startup (don't need to play games to
open pg_log; among other things, OverrideTransactionSystem goes away),
should improve performance a little, and opens the door to recycling
commit log space by removing no-longer-needed segments of the commit
log.  Actual recycling is not there yet, but I felt I should commit
this part separately since it'd still be useful if we chose not to
do transaction ID wraparound.
2001-08-25 18:52:43 +00:00
Bruce Momjian 4699d81dc9 Add ENCRYPTED/UNENCRYPTED control in createuser script. 2001-08-25 17:46:11 +00:00
Peter Eisentraut d374e06905 Hide backend debug output in initdb by default. To that end, the bootstrap
backend gets on -o option like the regular backend.
2001-08-25 00:31:17 +00:00
Bruce Momjian e8cb935921 Reverse sense of comparison in psql socket test, per Tom Lane. 2001-08-24 19:59:54 +00:00
Bruce Momjian 4142769257 There are two problems when compiling libpq.dll and psql.exe
on Windows. I'm not sure it is the best way to fix them
(see patch below.)

Mikhail Terekhov with mods by Tom Lane
2001-08-24 16:59:10 +00:00
Peter Eisentraut 627c0d4472 Add option to output SET SESSION AUTHORIZATION commands rather than
\connect, to avoid possible password prompts and such, at the drawback of
having to have superuser access.
2001-08-22 20:23:24 +00:00
Tom Lane f933766ba7 Restructure pg_opclass, pg_amop, and pg_amproc per previous discussions in
pgsql-hackers.  pg_opclass now has a row for each opclass supported by each
index AM, not a row for each opclass name.  This allows pg_opclass to show
directly whether an AM supports an opclass, and furthermore makes it possible
to store additional information about an opclass that might be AM-dependent.
pg_opclass and pg_amop now store "lossy" and "haskeytype" information that we
previously expected the user to remember to provide in CREATE INDEX commands.
Lossiness is no longer an index-level property, but is associated with the
use of a particular operator in a particular index opclass.

Along the way, IndexSupportInitialize now uses the syscaches to retrieve
pg_amop and pg_amproc entries.  I find this reduces backend launch time by
about ten percent, at the cost of a couple more special cases in catcache.c's
IndexScanOK.

Initial work by Oleg Bartunov and Teodor Sigaev, further hacking by Tom Lane.

initdb forced.
2001-08-21 16:36:06 +00:00
Peter Eisentraut 30c975e2cb One more round of translations and slight message tweaks 2001-08-19 22:17:03 +00:00
Tom Lane d4f4b971a4 Sequences are now based on int8, not int4, arithmetic. SERIAL pseudo-type
has an alias SERIAL4 and a sister SERIAL8.  SERIAL8 is just the same
except the created column is type int8 not int4.
initdb forced.  Note this also breaks any chance of pg_upgrade from 7.1,
unless we hack up pg_upgrade to drop and recreate sequences.  (Which is
not out of the question, but I don't wanna do it.)
2001-08-16 20:38:56 +00:00