Commit Graph

11054 Commits

Author SHA1 Message Date
Bruce Momjian bb8f8e6279 Change LIMIT #,# error message to be more generic. 2001-10-20 16:51:02 +00:00
Bruce Momjian f363b3177d Remove LIMIT #,# and suggest LIMIT # OFFSET #, per mailing list discussion. 2001-10-20 02:55:39 +00:00
Thomas G. Lockhart 424d9389d6 Fix transposed arguments for typmod for one INTERVAL production.
Mask both typmod subfields for INTERVAL to avoid setting the high bit,
 per dire warning from Tom Lane.
Clear tmask for DTK_ISO_TIME case to avoid time zone troubles.
 Symptom reported by Tom Lane.
Clean up checking for valid time zone info in output routine.
 This should now work for both SQL99 and Unix-style time zones.
Put in explicit check for INTERVAL() typmod rounding to avoid accumulating
 cruft in the lower bits. Not sure that this helps, but we'll need to do
 something. The symptom is visible with a query like
 select interval(2) '10000 days 01:02:03.040506';
Regression tests are patched to repair the Tom Lane symptom, and all pass.
2001-10-20 01:02:22 +00:00
Tom Lane 3a484d9e99 Fix plperl to discard cached function definition after CREATE OR
REPLACE FUNCTION.  Clean up typlen/typmod errors inherited from pltcl.
2001-10-19 22:43:49 +00:00
Tom Lane 379268aa62 Proper fix for glibc getopt() botch. Surprising we did not see this
before.
2001-10-19 20:47:09 +00:00
Tom Lane 58f6b951c2 Fix a lot of confusion between typlen and typmod. Didn't hurt too much
back when only varlena types paid any attention to typmod ...
2001-10-19 19:43:19 +00:00
Tom Lane 861a679fc1 Set optreset on platforms that have it before launching postmaster
subprocesses; perhaps this will fix portability problem just noted by
Lockhart.  Also, move test for bad permissions of DataDir to a more
logical place.
2001-10-19 18:19:41 +00:00
Tom Lane 6430e6e283 Ensure that all startup paths (postmaster, standalone postgres, or
bootstrap) check for a valid PG_VERSION file before looking at anything
else in the data directory.  This fixes confusing error report when
trying to start current sources in a pre-7.1 data directory.
Per trouble report from Rich Shepard 10/18/01.
2001-10-19 17:03:08 +00:00
Tom Lane 3d510653a4 Rename macro arg to avoid useless compiler warning when building plperl. 2001-10-19 15:38:57 +00:00
Bruce Momjian 2e65523f4f Without this patch I couldn't compile PostgreSQL on Solaris 8 x86 using
Sun's compiler. May be it will be usefull for someone else?

Denis Ustimenko
2001-10-19 15:06:48 +00:00
Bruce Momjian ece1b67f54 > This stops the interface from leaking the row tuples (and thus the
> results of every fetch).

Stephen Robert Norris
2001-10-19 15:00:26 +00:00
Bruce Momjian 9590249e14 Update TODO list. 2001-10-19 14:59:04 +00:00
Michael Meskes a535cd1f8b removed "not fully implemented" warning for nullif 2001-10-19 14:31:44 +00:00
Hiroshi Inoue 8c3cb43bac Change SC_fetch() to not retrieve data in case the
SQL_RETRIEVE_DATA option is SQL_RD_OFF. This would
avoid a crash when scrolling Grid controls.
2001-10-19 05:39:14 +00:00
Tom Lane abbc95e5c6 Fix pltcl to update cached function def after
CREATE OR REPLACE FUNCTION.
2001-10-19 02:43:46 +00:00
Bruce Momjian efd72ce376 Update TODO list. 2001-10-19 01:30:17 +00:00
Tom Lane 6b5aeb797f Typo. 2001-10-19 00:46:51 +00:00
Tom Lane eb133197b6 Move init_ps_display from postgres.c to postmaster.c, putting it
just after receipt of the startup packet.  Now, postmaster children
that are waiting for client authentication response will show as
'postgres: user database host authentication'.  Also, do an
init_ps_display for startup/shutdown/checkpoint subprocesses,
so that they are readily identifiable as well.  Fix an obscure race
condition that could lead to Assert failure in the postmaster ---
attempting to start a checkpoint process before any connections have
been received led to calling PostmasterRandom before setting random_seed.
2001-10-19 00:44:08 +00:00
Tom Lane 9047292725 Spell 'between' correctly, clean up spacing in error messages. 2001-10-18 23:16:09 +00:00
Tom Lane 43568d11ad Fix memory leakage when sending notice messages to client. 2001-10-18 23:07:29 +00:00
Tom Lane aed378e8d1 Fix authentication so that it doesn't record an extra 'Password
authentication failed' and a 'send() failed: Broken pipe' message
on every connection from psql in password auth mode.  Problem is
that psql doesn't ask user for a password until it sees a password
challenge failure, and libpq just closes the connection unceremoniously
if it's challenged for a password when it hasn't got one to send.
Accordingly, EOF from the client after asking for a password is
normal behavior and should not result in postmaster log entries.
2001-10-18 22:44:37 +00:00
Tom Lane 13e467f74f Add STATUS_EOF value needed for auth.c. Remove a bunch of unused
STATUS_xxx macros to reduce clutter.
2001-10-18 22:40:52 +00:00
Tom Lane 4fec55af6c Fix several problems with simple_prompt() --- the nastiest being that
the entered password would get echoed on some platforms, eg HPUX.
We have enough copies of this code that I'm thinking it ought to be
moved into libpq, but that's a task for another day.
2001-10-18 21:57:11 +00:00
Bruce Momjian f5a5b44c4d Change error code docs to use colons. 2001-10-18 20:43:05 +00:00
Bruce Momjian 278669e038 Document all the ecpg error codes. 2001-10-18 20:32:58 +00:00
Tom Lane b522ce0bcf Update for new expected results. 2001-10-18 20:10:31 +00:00
Tom Lane f9b6583747 Didn't compile on non-HAVE_TM_ZONE machines. 2001-10-18 19:54:59 +00:00
Tom Lane 369c9e3b6c Repair missing brace in HAVE_INT_TIMEZONE case. 2001-10-18 19:52:03 +00:00
Thomas G. Lockhart 9310075a13 Accept an INTERVAL argument for SET TIME ZONE per SQL99.
Modified the parser and the SET handlers to use full Node structures
 rather than simply a character string argument.
Implement INTERVAL() YEAR TO MONTH (etc) syntax per SQL99.
 Does not yet accept the goofy string format that goes along with, but
 this should be fairly straight forward to fix now as a bug or later
 as a feature.
Implement precision for the INTERVAL() type.
 Use the typmod mechanism for both of INTERVAL features.
Fix the INTERVAL syntax in the parser:
 opt_interval was in the wrong place.
INTERVAL is now a reserved word, otherwise we get reduce/reduce errors.
Implement an explicit date_part() function for TIMETZ.
 Should fix coersion problem with INTERVAL reported by Peter E.
Fix up some error messages for date/time types.
 Use all caps for type names within message.
Fix recently introduced side-effect bug disabling 'epoch' as a recognized
 field for date_part() etc. Reported by Peter E. (??)
Bump catalog version number.
Rename "microseconds" current transaction time field
 from ...Msec to ...Usec. Duh!
date/time regression tests updated for reference platform, but a few
 changes will be necessary for others.
2001-10-18 17:30:21 +00:00
Tom Lane 6254465d06 Extend code that deduces implied equality clauses to detect whether a
clause being added to a particular restriction-clause list is redundant
with those already in the list.  This avoids useless work at runtime,
and (perhaps more importantly) keeps the selectivity estimation routines
from generating too-small estimates of numbers of output rows.
Also some minor improvements in OPTIMIZER_DEBUG displays.
2001-10-18 16:11:42 +00:00
Michael Meskes 5045004958 Added Lee Kindness' patches. 2001-10-18 11:01:35 +00:00
Bruce Momjian f8bcf12ed9 Update file for pgcrypto. 2001-10-17 00:48:24 +00:00
Tom Lane 8be02853b8 Add documentation about statistics collector and stats views & functions. 2001-10-16 23:57:06 +00:00
Tom Lane b207081056 Make sure to clean out old activity string when recycling a backend entry. 2001-10-16 22:35:27 +00:00
Tom Lane 70e6003c76 Use LEFT JOIN, not FULL JOIN, in statistical views. 2001-10-16 20:51:35 +00:00
Barry Lind bf737b859f Updated the list of encodings supported to match what the backend now supports 2001-10-16 20:07:17 +00:00
Barry Lind f50793c743 Added some additional comments in the code 2001-10-16 20:05:22 +00:00
Bruce Momjian 076026bba9 Python handle as string all int8 values from postgresql. This could be
view when using the aggregate function count() and function nextval
that returns an int8 value, but in python is represented like string:

>> db.query("select nextval('my_seq')").getresult()
[('2',)]

>> db.query("select count(*) from films").dictresult()
[{'count': '120'}]



Ricardo Caesar Lenzi
2001-10-16 13:42:57 +00:00
Tatsuo Ishii cfe01796e6 Ok, here is the modified encoding table (column1 is the standard name,
2 is our "official" name, and 3 is alias). If there's no objection, I
will change them.

ASCII		SQL_ASCII
UTF-8		UNICODE		UTF_8
MULE-INTERNAL	MULE_INTERNAL
ISO-8859-1	LATIN1		ISO_8859_1
ISO-8859-2	LATIN2		ISO_8859_2
ISO-8859-3	LATIN3		ISO_8859_3
ISO-8859-4	LATIN4		ISO_8859_4
ISO-8859-5	ISO_8859_5
ISO-8859-6	ISO_8859_6
ISO-8859-7	ISO_8859_7
ISO-8859-8	ISO_8859_8
ISO-8859-9	LATIN5		ISO_8859_9
ISO-8859-10	LATIN6		ISO_8859_10
ISO-8859-13	LATIN7		ISO_8859_13
ISO-8859-14	LATIN8		ISO_8859_14
ISO-8859-15	LATIN9		ISO_8859_15
ISO-8859-16	LATIN10		ISO_8859_16
2001-10-16 10:09:17 +00:00
Tom Lane 2bb6b98d5c Add a section about the planner's statistics, including a description
of the new pg_stats view.
2001-10-16 01:13:44 +00:00
Tom Lane daf72bba91 Add note about pg_stats to pg_statistic entry; add sections for
pg_largeobject, pg_listener, pg_rewrite, pg_trigger; miscellaneous
small improvements.
2001-10-15 22:47:47 +00:00
Tom Lane e158670c1f Doesn't anyone test stuff before they commit it? 2001-10-15 20:15:09 +00:00
Tom Lane 77f27d5ec3 Fix some portability problems (get it to compile, at least, on HP's cc) 2001-10-15 19:15:18 +00:00
Tom Lane aa6970efff Fix some portability problems (get it to compile, at least, on HP's cc) 2001-10-15 18:56:30 +00:00
Tom Lane 1e2779117d Fix some portability problems (get it to compile, at least, on HP's cc) 2001-10-15 18:49:40 +00:00
Bruce Momjian 394925b60d > Uh, isn't the correct fix
> ! $$ = cat_str(8, make_str("grant"), $2, make_str("on"), $4, $5,
 > make_str("to"), $7, $8);
 > ISTM your patch loses the opt_with_grant clause.  (Of course the
 > backend doesn't currently accept that clause anyway, but that's no
 > reason for ecpg to drop it.)

My patch doesn't loose the option, it's never been passed on anyway:

 opt_with_grant:  WITH GRANT OPTION
                                {
                                        mmerror(ET_ERROR, "WITH GRANT OPTION is not supported.  Only relation owners can
 set privileges");
                                 }
                | /*EMPTY*/
                ;

The existing code in ecpg/preproc/preproc.y to handle the WITH option
simply throws an error and aborts the processing... The patch below
prevents the segfault and also passes on the WITH option to the
backend, probably a better fix.

Lee Kindness
2001-10-15 18:16:31 +00:00
Tom Lane b261cb9fa1 Updated regression test for tsearch, from Teodor Sigaev. 2001-10-15 17:41:33 +00:00
Bruce Momjian 66b77dbcd6 Prompt for password from /dev/tty and fall back to stdin/stderr. 2001-10-15 16:40:27 +00:00
Tatsuo Ishii cdce507053 Forgot to add this file... 2001-10-15 04:52:59 +00:00
Bruce Momjian 1c6bd04713 PG_DUMP NLS (Russian)
Here is another one :)
Another chunk of translated messages.
Please apply to the same file.

Serguei Mokhov
2001-10-15 02:50:16 +00:00