Commit Graph

14573 Commits

Author SHA1 Message Date
Tom Lane 9069a5fc33 Use a varno not chosen at random for dummy variables in the top-level
targetlist of a set-operation tree.  I'm not sure that this solution
will really stand the test of time --- perhaps we need to make a special
RTE for such vars to refer to.  But this quick hack fixes Brandon Craig
Rhodes' complaint of 10-Feb-02 about EXCEPT in CREATE RULE, while not
changing any behavior in the better-tested cases where leftmostRTI is
one anyway.
2003-02-11 04:13:06 +00:00
Tom Lane 8a4fdce9f2 Fix thinko in new logic about pushing down non-nullability constraints:
constraints appearing in outer-join qualification clauses are restricted
as to when and where they can be pushed down.  Add regression test
to catch future errors in this area.
2003-02-10 17:08:50 +00:00
Tom Lane ec8f0e82ef Add code to show join rule (for outer and IN joins) in join type name. 2003-02-10 17:06:23 +00:00
Tom Lane c5ba16a83c Get rid of last few vestiges of parsetree dependency on grammar token
codes, per discussion from last March.  parse.h should now be included
*only* by gram.y, scan.l, keywords.c, parser.c.  This prevents surprising
misbehavior after seemingly-trivial grammar adjustments.
2003-02-10 04:44:47 +00:00
Tom Lane b5956a2f22 Detect case where an outer join can be reduced to a plain inner join
because there are WHERE clauses that will reject the null-extended rows.
Per suggestion from Brandon Craig Rhodes, 19-Nov-02.
2003-02-09 23:57:19 +00:00
Barry Lind 43785a434e upped build# to 201 2003-02-09 23:45:45 +00:00
Barry Lind abcec0c125 Better error message on character set mismatches during conversion to unicode.
Also applied patch from Lars Stenberg to make callable statements use the form
select * from func() when running against a 7.3 server instead of select func() to allow for set returning functions to be called.

 Modified Files:
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/core/Encoding.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-02-09 23:14:55 +00:00
Tom Lane 39b7ec3309 Create a distinction between Lists of integers and Lists of OIDs, to get
rid of the assumption that sizeof(Oid)==sizeof(int).  This is one small
step towards someday supporting 8-byte OIDs.  For the moment, it doesn't
do much except get rid of a lot of unsightly casts.
2003-02-09 06:56:28 +00:00
Tom Lane 3646ab58b4 Remove bogus comment (too freely copied & pasted). 2003-02-09 00:35:55 +00:00
Tom Lane 145014f811 Make further use of new bitmapset code: executor's chgParam, extParam,
locParam lists can be converted to bitmapsets to speed updating.  Also,
replace 'locParam' with 'allParam', which contains all the paramIDs
relevant to the node (i.e., the union of extParam and locParam); this
saves a step during SetChangedParamList() without costing anything
elsewhere.
2003-02-09 00:30:41 +00:00
Tom Lane c15a4c2aef Replace planner's representation of relation sets, per pghackers discussion.
Instead of Lists of integers, we now store variable-length bitmap sets.
This should be faster as well as less error-prone.
2003-02-08 20:20:55 +00:00
Dave Cramer 893678eda7 applied Kris Jurka's patch for numeric 2003-02-07 12:47:29 +00:00
Tom Lane 3acf422316 Revise mechanism for getting rid of temp tables at backend shutdown.
Instead of grovelling through pg_class to find them, make use of the
handy dandy dependency mechanism: just delete everything that depends
on our temp schema.  Unlike the pg_class scan, the dependency mechanism
is smart enough to delete things in an order that doesn't fall foul of
any dependency restrictions.  Fixes problem reported by David Heggie:
a temp table with a serial column may cause a backend FATAL exit at
shutdown time, if it chances to try to delete the temp sequence first.
2003-02-07 01:33:06 +00:00
Tom Lane 00f1a41ab2 Make flatten_join_alias_vars() do the right thing when expanding an alias
referenced from a subquery.  Per example from Stefanos Harhalakis.
2003-02-06 22:21:11 +00:00
Tom Lane 77ede8900d Create a GUC variable REGEX_FLAVOR to control the type of regular
expression accepted by the regex operators, per discussion yesterday.

Along the way, reduce deadlock_timeout from PGC_POSTMASTER to PGC_SIGHUP
category.  It is probably best to insist that all backends share the same
setting, but that doesn't mean it has to be frozen at startup.
2003-02-06 20:25:33 +00:00
Tom Lane 465ed56531 Fix core dump when pltcl_elog is called with wrong number of parameters,
per report from Ian Harding.
2003-02-06 17:02:11 +00:00
Tom Lane e24977f3a4 Allow qualified type names in CREATE CAST, DROP CAST. Also allow the
construction 'SETOF type[]' which for some reason was previously
overlooked (you'd have to name the array type directly to make it work).
2003-02-05 20:16:42 +00:00
Tom Lane 7bcc6d98fb Replace regular expression package with Henry Spencer's latest version
(extracted from Tcl 8.4.1 release, as Henry still hasn't got round to
making it a separate library).  This solves a performance problem for
multibyte, as well as upgrading our regexp support to match recent Tcl
and nearly match recent Perl.
2003-02-05 17:41:33 +00:00
Dave Cramer 32c3db0f86 patch from Oliver Jowett to implement some of the jdbc3 methods 2003-02-05 11:12:39 +00:00
Bruce Momjian 865429e00f Update Hungarian FAQ, from Laszlo Hornyak 2003-02-04 12:32:41 +00:00
Bruce Momjian bf4bf092e5 Revert doc change so we mention moving past the last row of a cursor. 2003-02-04 11:23:58 +00:00
Dave Cramer 985e551b48 Applied Kris Jurkas patch to fix rollback and SQLException 2003-02-04 11:01:52 +00:00
Dave Cramer d23fd9572b applied patch from Oliver Jowett 2003-02-04 10:44:37 +00:00
Barry Lind 28ce9f0fed Two patches from Kris Jurka. One fixes a problem with incorrect type for double
and the other fixes a NPE in Statement.toString() under some circumstances.
The second patch was originally submitted by Oliver Jowett and updated by Kris
2003-02-04 10:09:32 +00:00
Barry Lind 16a30346c8 Patch from Nic Ferrier to add support for result sets being cursor based
so that rows can be fetched incrementally.  This is enabled by using
setFetchSize()
2003-02-04 09:20:12 +00:00
Tom Lane 2d1f940542 Minor code cleanup: remove no-longer-useful pull_subplans() function,
and convert pull_agg_clause() into count_agg_clause(), which is a more
efficient way of doing what it's really being used for.
2003-02-04 00:50:01 +00:00
Tom Lane 85caf1784a Detect duplicate aggregate calls and evaluate only one copy. This
speeds up some useful real-world cases like
SELECT x, COUNT(*) FROM t GROUP BY x HAVING COUNT(*) > 100.
2003-02-04 00:48:23 +00:00
Tom Lane ef5842b5f7 #ifdef out stuff that shouldn't be compiled when not USE_SSL.
Curious that gcc doesn't complain about unreferenced static variables.
2003-02-03 22:33:51 +00:00
Tom Lane 3752e85bad Determine the set of constraints applied to a domain at executor
startup, not in the parser; this allows ALTER DOMAIN to work correctly
with domain constraint operations stored in rules.  Rod Taylor;
code review by Tom Lane.
2003-02-03 21:15:45 +00:00
Bruce Momjian 464598b637 Add mention of CURRENT_SCHEMA for object creation. 2003-02-03 15:56:50 +00:00
Bruce Momjian 6b196c0754 Don't print NO ACTION foreign key actions in dumps and psql \d. 2003-02-03 15:17:24 +00:00
Tom Lane 4cff59d8d5 Tweak planner and executor to avoid doing ExecProject() in table scan
nodes where it's not really necessary.  In many cases where the scan node
is not the topmost plan node (eg, joins, aggregation), it's possible to
just return the table tuple directly instead of generating an intermediate
projection tuple.  In preliminary testing, this reduced the CPU time
needed for 'SELECT COUNT(*) FROM foo' by about 10%.
2003-02-03 15:07:08 +00:00
Bruce Momjian 0d3e36b668 Move pg_service.conf.sample to /interfaces/libpq. 2003-02-03 14:24:07 +00:00
Bruce Momjian 802a4d4111 Change MOVE LAST to MOVE ALL.
Standard says FETCH LAST is after last row, and we don't do that.
2003-02-03 14:04:24 +00:00
Tom Lane c7bceca156 Implement EXPLAIN EXECUTE. By Neil Conway, with some kibitzing from
Tom Lane.
2003-02-02 23:46:38 +00:00
Tom Lane 6adb475f77 Update release history for 7.3.2. 2003-02-02 19:48:20 +00:00
Tom Lane 967e8a37ab Fix nodeUnique to behave correctly when reversing direction after reaching
either end of subplan results.  This prevents misbehavior of cursors
on SELECT DISTINCT ... queries.  Per bug report 1-Feb-02.
2003-02-02 19:08:57 +00:00
Tom Lane 6ba8af9d5d Remove restriction that cast functions cannot be volatile. This
restriction was debatable to begin with, but it has now become obvious
that it breaks forward-porting of user-defined types; contrib/lo being
the most salient example.
2003-02-01 22:09:26 +00:00
Tom Lane e0a1ee2053 Cleaner solution to the problem of loading pre-7.3 dumps containing
columns of type lo (see contrib/lo).  Rather than hacking the function
definitions on-the-fly, just modify the queries issued by FixupBlobRefs
so that they work even if CREATE CAST hasn't been issued.
2003-02-01 22:06:59 +00:00
Tom Lane 330b4e4215 Changes of 6-Sep-02 broke pg_restore's ability to recognize tar-format
files.  Fix it.
2003-02-01 19:29:16 +00:00
Tom Lane 21166170c8 Fix assign_session_authorization() to not be confused by all-numeric
user names.  Per recent reports.
2003-02-01 18:31:28 +00:00
Tom Lane 361eaa185f Prevent core dump from calling Tcl_DontCallWhenDeleted() with a null
interp pointer.  Per report from Gerhard Hintermayer.
2003-02-01 00:22:12 +00:00
Tom Lane 032235cafe Apply ljb's patch to prevent both memory leak and core dump during
connection shutdown.  This is a grotty workaround for a Tcl bug, but
said bug has been there long enough that I'm not holding my breath
for a real fix.  Per discussions and testing from ljb and g.hintermayer.
2003-02-01 00:07:03 +00:00
Tom Lane f51c7ca182 Make plpython's spi_execute interface handle NULLs properly.
From Andrew Bosma.
2003-01-31 22:35:24 +00:00
Tom Lane 6f49703f0e Clean up plpython error reporting so that its regression test passes
with some amount of cleanliness.  I see no need to report the internal
Python name rather than the SQL procedure name in error tracebacks.
2003-01-31 22:25:14 +00:00
Tom Lane 9d00798720 Tweak bison build rules so that we get the same error messages from
bison 1.875 and later as we did from earlier bison releases.  Eventually
we will probably want to adopt the newer message spelling ... but not yet.
Per recent discussion on pgpatches.
Note: I didn't change the build rules for bootstrap, ecpg, or plpgsql
grammars, since these do not affect regression test results.
2003-01-31 20:58:00 +00:00
Tom Lane bd96dd1184 Allow a time zone to be specified (and silently ignored) in the input
for type 'time without time zone', as we already did for type
'timestamp without time zone'.  This patch was proposed by Tom Lockhart
on 7-Nov-02, but he never got around to applying it.  Adjust regression
tests and documentation to match.
2003-01-31 01:08:08 +00:00
Tom Lane 37b247a5e9 Handle mixed-case names properly in plpgsql_parse_tripwordtype.
From Neil Conway.
2003-01-31 00:31:53 +00:00
Tom Lane 0de771dd5c Fix typo, per Neil Conway. 2003-01-31 00:10:51 +00:00
Tom Lane 4ec457ad58 Fix regression in .pgpass support. From Neil Conway. 2003-01-30 19:49:54 +00:00