Commit Graph

2467 Commits

Author SHA1 Message Date
Tom Lane 3f9d2edddc Restore previous psql behavior of not printing useless trailing spaces
after the data in the last column on a line.
2006-02-12 02:56:21 +00:00
Bruce Momjian 07bae9c099 Please find enclosed a patch that lets you use \c to connect
(optionally) to a new host and port without exiting psql.  This
eliminates, IMHO, a surprise in that you can now connect to PostgreSQL
on a differnt machine from the one where you started your session. This
should help people who use psql as an administrative tool.

David Fetter
2006-02-12 02:54:30 +00:00
Bruce Momjian 4cb27fef0a o Improve psql's handling of multi-line statements
Currently, while \e saves a single statement as one entry, interactive
	statements are saved one line at a time.  Ideally all statements
	would be saved like \e does.

Sergey E. Koposov
2006-02-11 21:55:35 +00:00
Tom Lane 9bf2ac2a40 Clean up signedness warnings and 64-bit bugs in recent psql printing
patch.  Martijn van Oosterhout and Tom Lane
2006-02-10 22:29:06 +00:00
Tom Lane fc9c20eb72 Make it possible to run initdb from an admin account on Windows,
by giving up admin privileges (only works if newer than NT4).

Magnus
2006-02-10 22:05:42 +00:00
Tom Lane a25cd81007 Enable pg_ctl to give up admin privileges when starting the server under
Windows (if newer than NT4, else works same as before).

Magnus
2006-02-10 22:00:59 +00:00
Bruce Momjian 1a7be5cc7e Fix psql after newline patch for calloc(0).
Kris Jurka
2006-02-10 15:48:05 +00:00
Bruce Momjian c01999a557 Allow psql multi-line column values to align in the proper columns
If the second output column value is 'a\nb', the 'b' should appear
  in the second display column, rather than the first column as it
  does now.

Change libpq's PQdsplen() to return more useful values.

> Note: this changes the PQdsplen function, it can now return zero or
> minus one which was not possible before. It doesn't appear anyone is
> actually using the functions other than psql but it is a change. The
> functions are not actually documentated anywhere so it's not like we're
> breaking a defined interface. The new semantics follow the Unicode
> standard.

BACKWARD COMPATIBLE CHANGE.

The only user-visible change I saw in the regression tests is that a
SELECT * on a table where all the columns have been dropped doesn't
return a blank line like before.  This seems like a step forward.

Martijn van Oosterhout
2006-02-10 00:39:04 +00:00
Bruce Momjian 593763c086 This fixes pg_dump so that when using the '-O' no owners option it does
not print the owner name in the object comment.

eg:

--
-- Name: actor; Type: TABLE; Schema: public; Owner: chriskl; Tablespace:
--

Becomes:

--
-- Name: actor; Type: TABLE; Schema: public; Owner: -; Tablespace:
--

This makes it far easier to do 'user independent' dumps.  Especially for
distribution to third parties.

Christopher Kings-Lynne
2006-02-09 20:52:13 +00:00
Tom Lane ff2cc83f8a Provide the libpq error message when PQputline or PQendcopy fails. 2006-02-09 18:28:29 +00:00
Peter Eisentraut 4d464076ff Make --version option print fixed program name. 2006-02-07 11:36:36 +00:00
Tom Lane 8e4057cc7d Fix pg_restore to properly discard COPY data when trying to continue
after an error in a COPY statement.  Formerly it thought the COPY data
was SQL commands, and got quite confused.

Stephen Frost
2006-02-05 20:58:47 +00:00
Tom Lane cab99ec300 Tweak initdb to reduce verbosity of progress messages, by printing just
one 'creating subdirectories' message instead of one per subdirectory.
The original decision to print something for each subdirectory was made
when there were only one or two of 'em; we have way too many now.
Per discussion.
2006-01-27 19:01:15 +00:00
Bruce Momjian 4789e98801 Add GRANT ON SEQUENCE syntax to support sequence-only permissions.
Continue to support GRANT ON [TABLE] for sequences for backward
compatibility;  issue warning for invalid sequence permissions.

[Backward compatibility warning message.]

Add USAGE permission for sequences that allows only currval() and
nextval(), not setval().

Mention object name in grant/revoke warnings because of possible
multi-object operations.
2006-01-21 02:16:21 +00:00
Peter Eisentraut 7930e627d8 Fix pg_ctl crash on "unregister" when a data directory is not specified.
by Magnus Hagander
2006-01-14 15:41:28 +00:00
Bruce Momjian 2583663623 Brace cleanup. 2006-01-11 21:24:30 +00:00
Neil Conway fb627b76cc Cosmetic code cleanup: fix a bunch of places that used "return (expr);"
rather than "return expr;" -- the latter style is used in most of the
tree. I kept the parentheses when they were necessary or useful because
the return expression was complex.
2006-01-11 08:43:13 +00:00
Tom Lane e4a6bd224c Fix pg_dump to add the required OPERATOR() decoration to schema-qualified
operator names.  This is needed when dumping operator definitions that have
COMMUTATOR (or similar) links to operators in other schemas.
Apparently Daniel Whitter is the first person ever to try this :-(
2006-01-09 21:16:17 +00:00
Bruce Momjian 38e75d9275 Use RELKIND_COMPOSITE_TYPE rather than hardcoded 'c'. 2006-01-06 19:08:33 +00:00
Peter Eisentraut 86c23a6eb2 Make all command-line options of postmaster and postgres the same. See
http://archives.postgresql.org/pgsql-hackers/2006-01/msg00151.php for the
complete plan.
2006-01-05 10:07:46 +00:00
Bruce Momjian 44f9021223 Remove BEOS port. 2006-01-05 03:01:38 +00:00
Bruce Momjian a1675649e4 Remove QNX port. 2006-01-05 01:56:30 +00:00
Tom Lane 71ad8e2077 Fix incorrect treatment of RL_PROMPT_START_IGNORE/RL_PROMPT_END_IGNORE,
per http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=343616 via Martin Pitt.
2006-01-03 23:32:30 +00:00
Andrew Dunstan 14d6c9fe6f Remove the nexus between trial_buffs and trial_conns, and don't test shared buffers lower than or equal to a value we already know is good, but use that value instead. This will make it easier to adjust the trial values and/or formulae in future if necessary. 2006-01-02 16:45:12 +00:00
Neil Conway 0898033b1e Remove DOS line endings ("\r\n") from several .po files. DOS line endings
are inconsistent with the rest of the .po files, and apparently cause
problems for Sun's cc. Per report on IRC from "bitvector2".
2006-01-01 10:13:56 +00:00
Tom Lane bcb26d74cb Clean up initdb's code for selecting max_connections and shared_buffers
a little bit, and set the minimum buffers-per-connection ratio to 10 not
5.  I folded the two test routines into one to counteract the illusion
that the tests can be twiddled independently, and added some documentation
pointing out the necessary connection between the sets of values tested.
Fixes strange choices of parameters that I noticed CVS tip making on
Darwin with Apple's undersized default SHMMAX.
2005-12-31 23:50:59 +00:00
Andrew Dunstan a37422e042 Increase amount of shared buffers initdb tries to allocate to 4000,
and add logic to try max_fsm_pages up to 200000, plus accompanying minor
docs changes.
2005-12-27 23:54:01 +00:00
Peter Eisentraut 6840cccd11 Rename pg_make_encrypted_password to PQencryptPassword. 2005-12-26 14:58:06 +00:00
Tom Lane ea9b028dc7 Add an officially exported libpq function to encrypt passwords, and
modify the previous \password patch to use it instead of depending
on a not-officially-exported function.  Per discussion.
2005-12-23 01:16:38 +00:00
Peter Eisentraut b16566d771 Add new psql command \password for changing role password with client-side
password encryption.  Also alter createuser command to the same effect.
2005-12-18 02:17:16 +00:00
Bruce Momjian f82e2baef6 Use a proper enum for tri-valued variables. 2005-12-12 15:48:04 +00:00
Bruce Momjian 59b89e9cc7 Document tri-valued variables in createdb, +1, -1, 0. 2005-12-12 15:41:52 +00:00
Peter Eisentraut a29c04a541 Allow installation into directories containing spaces in the name. 2005-12-09 21:19:36 +00:00
Peter Eisentraut 625d4b38e0 Let initdb detect the date order of the lc_time locale and initialize the
datestyle parameter of the new cluster accordingly.
2005-12-09 15:51:14 +00:00
Bruce Momjian c03aa1f9c9 > 1) I'm proposing a patch to do the DROP FUNCTION argument tab completion.
> Now, the arguments of the drop function can be tab completed. for example
>
> drop function strpos (
> <press tab>
> drop FUNCTION strpos (text, text)
>
> or:
>
> wsdb=# drop FUNCTION length (
> bit)        bytea)      character)  lseg)       path)       text)
> <press c>
> wsdb# DROP FUNCTION length ( character)
>
> I think that this patch should be rather useful. At it least I hate
> always to type all the arguments of the dropped functions.
>
> 2) Also some fixes applied for the
> CREATE INDEX syntax
>
> now the parenthesises are inserted by tab pressing.
> suppose I have the table q3c:

Sergey E. Koposov
2005-12-08 21:33:58 +00:00
Peter Eisentraut a80c9ad00d Add missing translation marker 2005-12-08 21:18:22 +00:00
Bruce Momjian 4ebd4224a5 Disble some Win32-specific code in win32-client-only builds:
I have the problem, when building by MS-VC6.
An error occurs in the 8.1.0 present source codes.

nmake -f win32.mak
..\..\port\getaddrinfo.c(244) : error C2065: 'WSA_NOT_ENOUGH_MEMORY'
..\..\port\getaddrinfo.c(342) : error C2065: 'WSATYPE_NOT_FOUND'

This is used by winsock2.h. However, Construction of a windows base is
winsock.h.
Then, Since MinGW has special environment, this is right. but, it is not
found in VC6.
Furthermore, in getaddrinfo.c, IPV6-API is used by
LoadLibraryA("ws2_32");
Referring to of dll the external memory generates this violation by VC6
specification.

I considered whether the whole should have been converted into winsock2.
However, Now, DLL of MinGW creation operates wonderfully as it is.
That's right, it has pliability by replacement of simple DLL.
Then, I propose the system using winsock(non IPV6) in construction of
VC6.

Hiroshi Saito
2005-12-08 17:52:11 +00:00
Tom Lane e4a9229d55 Treat procedural languages as owned by the bootstrap superuser, rather
than owned by nobody.  This results in cleaner display of language ACLs,
since the backend's aclchk.c uses the same convention.  AFAICS there is
no practical difference but it's nice to avoid emitting SET SESSION
AUTHORIZATION; also this will make it easier to transition pg_dump to
some future version in which we may include an explicit ownership column
in pg_language.  Per gripe from David Begley.
2005-12-03 21:06:18 +00:00
Tom Lane 6f5efe3d16 Fix obsolete comment. 2005-12-02 22:06:07 +00:00
Bruce Momjian 436a2956d8 Re-run pgindent, fixing a problem where comment lines after a blank
comment line where output as too long, and update typedefs for /lib
directory.  Also fix case where identifiers were used as variable names
in the backend, but as typedefs in ecpg (favor the backend for
indenting).

Backpatch to 8.1.X.
2005-11-22 18:17:34 +00:00
Alvaro Herrera 33e9f2c3d4 Add tab completion for RESET SESSION AUTHORIZATION. 2005-11-18 16:31:11 +00:00
Andrew Dunstan b7a9e3ceb4 make psql honor explicit database parameter in -l mode, in case "postgres" database is missing - per complaint from Philip Yarra. 2005-11-17 23:42:26 +00:00
Bruce Momjian c5686b2904 Re-run pgindent to fix breakage when exceeding 150 'else if' clauses.
Cosmetic fix only.
2005-11-14 17:48:43 +00:00
Tom Lane 2a8d3d83ef R-tree is dead ... long live GiST. 2005-11-07 17:36:47 +00:00
Alvaro Herrera 645adf5de8 Translation updates forward-port to HEAD. 2005-11-07 02:40:38 +00:00
Peter Eisentraut 8959e9b9d3 Translation updates 2005-11-04 23:31:12 +00:00
Tom Lane af331e2526 Ensure that we only create one ConsoleCtrlHandler per psql process,
so as to avoid performance issues and possible ultimate crash on long
psql scripts.  Per Merlin Moncure.
2005-11-04 18:35:40 +00:00
Alvaro Herrera 76c9ac8ebb Translation updates. 2005-11-03 17:00:54 +00:00
Peter Eisentraut 9b0a164833 Translation updates 2005-10-29 00:41:37 +00:00
Bruce Momjian 3332e38189 Disable expanded mode only for \d tablename, not for all backslash
commands.  Per complaint that \df+ is clearer in expanded mode.
2005-10-27 13:34:47 +00:00