Commit Graph

14301 Commits

Author SHA1 Message Date
Bruce Momjian c78701697c The actual segfault was caused by a double pfree(), but ISTM that
failing to find pg_hba.conf should be a fatal error anyway, so I
increased the priority of the elog() from LOG to FATAL and refactored
the code a little bit.

Neil Conway
2002-12-14 18:49:37 +00:00
Bruce Momjian fb2d7a24f9 Ok, I think I've gotten this figured out now. I saw this comment in
pqcomm.c, switched the ERROR logs to COMMERROR logs and it all works.
I've attached a patch to be-secure.c that fixes all my problems.

Nathan Mueller
2002-12-14 18:39:14 +00:00
Peter Eisentraut 1b42ad7e59 Initial version of the SQL information schema 2002-12-14 00:24:35 +00:00
Tom Lane 2d8d66628a Clean up plantree representation of SubPlan-s --- SubLink does not appear
in the planned representation of a subplan at all any more, only SubPlan.
This means subselect.c doesn't scribble on its input anymore, which seems
like a good thing; and there are no longer three different possible
interpretations of a SubLink.  Simplify node naming and improve comments
in primnodes.h.  No change to stored rules, though.
2002-12-14 00:17:59 +00:00
Bruce Momjian 29cdab3d53 Increment libpq major number for 7.3.1 and minor for 7.4. 2002-12-13 22:17:57 +00:00
Tom Lane 3145cbc14f Admit defeat on the prospect of keeping straight exactly which platforms
produce which output in the geometry test, even with the problem narrowed
down to only whether they print minus zero or not.  Instead, use
pg_regress' locale-variant mechanism to automatically consider the test
to pass if it matches either supplied comparison file.  geometry_1.out
replaces the former geometry-positive-zeros.out.
2002-12-13 20:35:57 +00:00
Bruce Momjian 88d639e6e8 Protect from null param on ecpg disconnect, verified by Roland Karch 2002-12-13 20:29:07 +00:00
Tom Lane 0f8e9b4d74 Add a basic regression test for IS DISTINCT FROM, which has spent way too
much time in a broken state for lack of anyone noticing.
2002-12-13 20:16:11 +00:00
Tom Lane 3a4f7dde16 Phase 3 of read-only-plans project: ExecInitExpr now builds expression
execution state trees, and ExecEvalExpr takes an expression state tree
not an expression plan tree.  The plan tree is now read-only as far as
the executor is concerned.  Next step is to begin actually exploiting
this property.
2002-12-13 19:46:01 +00:00
Tom Lane 77b7a740f9 Adjust costsize calculations to avoid introducing unnecessary roundoff
error.  This seems to explain the differing choice of plan that's been
causing geometry regress test to fail for the last few days.
2002-12-13 17:29:25 +00:00
Bruce Momjian 023ff17178 Remove strerror output for openssl SYSCALL error check. 2002-12-13 05:51:29 +00:00
Bruce Momjian 8358302ded This patch fixes minor bugs in dictionary generator in contrib/tsearch
(contrib/tsearch/makedict/makedict.pl)

[ Backpatched to 7.3.]

Teodor Sigaev
2002-12-13 05:50:18 +00:00
Bruce Momjian e60b5d5306 This patch fixes a few typos in the documentation for the '~/.pgpass'
libpq feature.

Neil Conway
2002-12-13 05:49:10 +00:00
Bruce Momjian 1b706651b6 Here's the patch I mentioned on HACKERS to fix up ALTER command tab
completion. Note that it's based on 7.3 tarball, not CVS HEAD, or 7.3rel
branch. Damn, looking at CVS, this will patch into 7.3rel (just tested,
it does) probably collide with Rod Taylor's patch adding ALTER TRIGGER
stuff. O.K, second patch attached against HEAD - not tested, hand
merged.

Ross Reedstrom
2002-12-13 05:36:24 +00:00
Bruce Momjian d274105942 > There is an ugly little problem with the DB wrapper class.
>
> In pg.py the attributes of DB are defined as being the same as
> the attributes of the corresponding pgobject "db", using the following

...

> The problem is that the attributes of db (which are read only)
> are not static (they are actually function calls to PostgreSQL),
> especially "status" and "error", but those attributes are copied
> and this is done only once when initializing the DB object.
>
> So, in effect, only the attribute "db.error" of a DB instance
> will be updated, but not the attribute "error". Same with "status".


> Don't copy the (read only) attributes of the pgobject to the
> DB object, but only the methods, and all of them, like this:
>
> --------------- change in pg.py ------------------
> # Create convience methods, in a way that is still overridable.
> for e in self.db.__methods__:
>  setattr(self, e, getattr(self.db, e))
> ----------------------------------------------------
>
> Furthermore, make an addition to the documentation of the
> DB wrapper class (i.e. in pygresql-pg-db.html):
> After the sentence "All pgobject methods are included in this class also."
> add the following sentence "The pgobject read-only attributes can be
> accessed py adding the prefix 'db.' to them."

Christoph Zwerschke
2002-12-12 22:49:27 +00:00
Bruce Momjian 482ed836f7 Check SSL_get_error() value SSL_ERROR_SYSCALL to see if SSL_read()
returned -1, per SSL_get_error() documentation.

Nathan Mueller
2002-12-12 22:42:39 +00:00
Bruce Momjian 5587f077ab While porting my TPC-C implementation from Oracle, I discovered the
attached problem with the EXEC SQL COMMIT RELEASE statement.

Roland Karch
2002-12-12 21:50:01 +00:00
Tom Lane b73251686f Don't produce bogus COPY command when there are no undropped columns
in a table.
2002-12-12 21:03:24 +00:00
Bruce Momjian 40c4472e22 TODO marked as done:
* Add schema, cast, and conversion backslash commands to psql

I had to create a new publically available function,
pg_conversion_is_visible, as it seemed to be missing from the catalogs.
This required me to do no small amount of hacking around in namespace.c

I have updated the \? help and sgml docs.

\dc - list conversions [PATTERN]
\dC - list casts
\dn list schemas

I didn't support patterns with casts as there's nothing obvious to match
against.

Catalog version incremented --- initdb required.

Christopher Kings-Lynne
2002-12-12 21:02:25 +00:00
Bruce Momjian 8ac39d02fd Done:
> * -Add schema, cast, and conversion backslash commands to psql (Christopher)
2002-12-12 21:02:21 +00:00
Tom Lane 4ad0aa3efb Don't force rebuild of all of backend/parser when we only need
keywords.o.
2002-12-12 21:02:00 +00:00
Tom Lane b0422b215c Preliminary code review for domain CHECK constraints patch: add documentation,
make VALUE a non-reserved word again, use less invasive method of passing
ConstraintTestValue into transformExpr, fix problems with nested constraint
testing, do correct thing with NULL result from a constraint expression,
remove memory leak.  Domain checks still need much more work if we are going
to allow ALTER DOMAIN, however.
2002-12-12 20:35:16 +00:00
Tom Lane ff7349694f Guard against overrunning CTZName buffer when TZ is bogus. 2002-12-12 19:16:55 +00:00
Tom Lane a0bf885f9e Phase 2 of read-only-plans project: restructure expression-tree nodes
so that all executable expression nodes inherit from a common supertype
Expr.  This is somewhat of an exercise in code purity rather than any
real functional advance, but getting rid of the extra Oper or Func node
formerly used in each operator or function call should provide at least
a little space and speed improvement.
initdb forced by changes in stored-rules representation.
2002-12-12 15:49:42 +00:00
Bruce Momjian debb072886 Add for protocol changes:
> 	o Compression?
2002-12-12 00:19:22 +00:00
Bruce Momjian b7ebebea1e Move psql \? Formatting above Large Object/Copy. 2002-12-11 23:07:06 +00:00
Bruce Momjian c4a7e5dd9f psql \? rearrangement, suggested by Tom. 2002-12-11 23:03:45 +00:00
Bruce Momjian 721dd19212 Reorder psql \? help into groupings, idea from Harald Armin Massa. 2002-12-11 22:45:13 +00:00
Bruce Momjian dc8d322a8b Mark SCO Openserver 5.0.4. supported by 7.3.1 as per chat report from user.
template/sco updated.
2002-12-11 22:27:26 +00:00
Bruce Momjian 92d77c69e5 Fix line count error reporting in config files, like pg_hba.conf, per
report from Oliver Elphick.

Backpatch to 7.3.
2002-12-11 22:17:11 +00:00
Dave Cramer d9d59ca65e patch for getTables to fix problems with backends before 7.3 by Kris Jurka 2002-12-11 21:02:58 +00:00
Dave Cramer 58eeb82cf8 Mike Beachy's build patch to allow ant builds without make 2002-12-11 12:29:13 +00:00
Dave Cramer a905eaacf0 Aaron's patch for Pooled Connections 2002-12-11 11:42:14 +00:00
Bruce Momjian 0046d80b97 Back out psql help change. Not done yet. 2002-12-11 04:09:51 +00:00
Bruce Momjian 6ca16d7b80 Bump version for 7.3 and 7.4. 2002-12-11 04:07:39 +00:00
Bruce Momjian 944f95d2b6 Add:
>
> * Wire Protocol Changes
> 	o Show transaction status in psql
> 	o Allow binding of query parameters, support for prepared queries
> 	o Add optional textual message to NOTIFY
> 	o Remove hard-coded limits on user/db/password names
> 	o Remove unused elements of startup packet (unused, tty, passlength)
> 	o Fix COPY/fastpath protocol?
> 	o Replication support?
> 	o Error codes
> 	o Dynamic character set handling
> 	o Special passing of binary values in platform-neutral format (bytea?)
> 	o ecpg improvements?
> 	o Add decoded type, length, precision
2002-12-10 22:27:45 +00:00
Tom Lane 5435944e23 Reverse out unintended resultmap change. 2002-12-10 18:23:12 +00:00
Tom Lane 53f275b9e5 If typecmds is going to have its own header file, said header file
should include what it needs.
2002-12-10 16:12:53 +00:00
D'Arcy J.M. Cain be134e9dc4 Add an unnecessary assignment to remove a bogus warning. I checked the
logic carefully and I am sure that the test against n happens after it
is assigned to.
2002-12-10 11:43:44 +00:00
Bruce Momjian 1d8dfe3ac4 More minor improvements to the SGML docs, namely
doc/src/sgml/runtime.sgml

Neil Conway
2002-12-10 01:57:46 +00:00
Bruce Momjian bc6625970c Following patch avoids removing oids in the temporary table from the
temporary table.

Kenji Sugita
2002-12-10 01:57:16 +00:00
Bruce Momjian b842726fc7 I've simplified the Darwin/Mac OS X startup script I submitted earlier
in the year. This version has only the two files required by the Darwin
startup bundle design. Plus the sh script now uses Darwin-standard
functions to start up PostgreSQL, and it checks for the presence of a
variable in /etc/hostconfig, as do other Darwin startup scripts.

I suggest that a new directory be created,
contrib/start-scripts/darwin, and that these two files be put into it.
Folks who want to use the script can read the comments inside it to
figure out how to use it.

David Wheeler
2002-12-09 21:26:09 +00:00
Bruce Momjian 3bca6ca61c This patch updates doc/src/sgml/runtime.sgml to refer to "MacOS X", not
"OS/X".

Neil Conway
2002-12-09 21:03:30 +00:00
Tom Lane 9ee4891570 Some quick fixes for ALTER DOMAIN patch. It still needs a lot of work,
but at least it doesn't generate gcc warnings.
2002-12-09 20:31:05 +00:00
Peter Eisentraut 4ed6be54e2 Fix Latin9/Unicode conversion by selecting the right table. 2002-12-09 19:47:21 +00:00
Tom Lane 780651d09c Update obsolete comment. 2002-12-09 18:21:43 +00:00
Bruce Momjian 1170a970a9 Add:
> * Add ROLLUP, CUBE, GROUPING SETS options to GROUP BY
2002-12-09 18:09:44 +00:00
Tom Lane d6161ba7ec Explain's code for showing quals of SubqueryScan nodes has been broken
all along; not noticed till now.  It's a scan not an upper qual ...
2002-12-06 19:28:03 +00:00
Bruce Momjian 3af3f79e69 In the examples, I missed changing a few 'column' and 'table' mentions
to domain when copying alter table docs.
--
Rod Taylor <rbt@rbt.ca>
2002-12-06 16:40:13 +00:00
Bruce Momjian e87e82d2b7 Attached are two small patches to expose md5 as a user function -- including
documentation and regression test mods. It seemed small and unobtrusive enough
to not require a specific proposal on the hackers list -- but if not, let me
know and I'll make a pitch. Otherwise, if there are no objections please apply.

Joe Conway
2002-12-06 05:20:28 +00:00