summaryrefslogtreecommitdiff
path: root/contrib/dblink
Commit message (Collapse)AuthorAgeFilesLines
* Cause initdb to create a third standard database "postgres", whichTom Lane2005-06-214-10/+10
| | | | | | | | | | | | | | unlike template0 and template1 does not have any special status in terms of backend functionality. However, all external utilities such as createuser and createdb now connect to "postgres" instead of template1, and the documentation is changed to encourage people to use "postgres" instead of template1 as a play area. This should fix some longstanding gotchas involving unexpected propagation of database objects by createdb (when you used template1 without understanding the implications), as well as ameliorating the problem that CREATE DATABASE is unhappy if anyone else is connected to template1. Patch by Dave Page, minor editing by Tom Lane. All per recent pghackers discussions.
* Document get_call_result_type() and friends; mark TypeGetTupleDesc()Tom Lane2005-05-301-42/+34
| | | | | | and RelationNameGetTupleDesc() as deprecated; remove uses of the latter in the contrib library. Along the way, clean up crosstab() code and documentation a little.
* Modify hash_search() API to prevent future occurrences of the errorTom Lane2005-05-291-5/+0
| | | | | | | | | | | | | spotted by Qingqing Zhou. The HASH_ENTER action now automatically fails with elog(ERROR) on out-of-memory --- which incidentally lets us eliminate duplicate error checks in quite a bunch of places. If you really need the old return-NULL-on-out-of-memory behavior, you can ask for HASH_ENTER_NULL. But there is now an Assert in that path checking that you aren't hoping to get that behavior in a palloc-based hash table. Along the way, remove the old HASH_FIND_SAVE/HASH_REMOVE_SAVED actions, which were not being used anywhere anymore, and were surely too ugly and unsafe to want to see revived again.
* Remove second argument from textToQualifiedNameList(), as it is no longerNeil Conway2005-05-271-1/+1
| | | | used. From Jaime Casanova.
* Add a --dbname option to the pg_regress script, and use pl_regressionTom Lane2005-05-172-16/+16
| | | | | | for testing PLs and contrib_regression for testing contrib, instead of overwriting the core system's regression database as formerly done. Andrew Dunstan
* Completion of project to use fixed OIDs for all system catalogs andTom Lane2005-04-141-2/+1
| | | | | | | indexes. Replace all heap_openr and index_openr calls by heap_open and index_open. Remove runtime lookups of catalog OID numbers in various places. Remove relcache's support for looking up system catalogs by name. Bulky but mostly very boring patch ...
* Convert oidvector and int2vector into variable-length arrays. ThisTom Lane2005-03-291-25/+22
| | | | | | | | | | | | | change saves a great deal of space in pg_proc and its primary index, and it eliminates the former requirement that INDEX_MAX_KEYS and FUNC_MAX_ARGS have the same value. INDEX_MAX_KEYS is still embedded in the on-disk representation (because it affects index tuple header size), but FUNC_MAX_ARGS is not. I believe it would now be possible to increase FUNC_MAX_ARGS at little cost, but haven't experimented yet. There are still a lot of vestigial references to FUNC_MAX_ARGS, which I will clean up in a separate pass. However, getting rid of it altogether would require changing the FunctionCallInfoData struct, and I'm not sure I want to buy into that.
* Some more missed copyright notices. Many of these look like theyTom Lane2005-01-011-1/+1
| | | | | should have been caught by the src/tools/copyright script ... why weren't they?
* Update copyrights that were missed.Bruce Momjian2005-01-012-2/+2
|
* This makes dblink pass its installcheck test on platforms whereTom Lane2004-10-281-3/+3
| | | | | | | | | snprintf(data, len, %s, NULL) crash. The code was trying to find a connection by name when it already had an unnamed connection and did not have a name to search with. Kris Jurka
* Modify hash_create() to elog(ERROR) if an error occurs, rather thanNeil Conway2004-10-251-9/+1
| | | | | | | | returning a NULL pointer (some callers remembered to check the return value, but some did not -- it is safer to just bail out). Also, cleanup pgstat.c to use elog(ERROR) rather than elog(LOG) followed by exit().
* Remove duplicate PQclear(res) operations leading to double free() andTom Lane2004-09-281-9/+5
| | | | | | subsequent core dump. It looks like at one time DBLINK_RES_ERROR_AS_NOTICE didn't include a PQclear, but now it does and so these other ones are duplicate.
* Pgindent run for 8.0.Bruce Momjian2004-08-291-4/+4
|
* Update copyright to 2004.Bruce Momjian2004-08-293-3/+3
|
* > Please find enclose a submission to fix these problems.Bruce Momjian2004-08-201-5/+10
| | | | | | | | | | | | | | | | | | | | | | > > The patch adds missing the "libpgport.a" file to the installation under > "install-all-headers". It is needed by some contribs. I install the > library in "pkglibdir", but I was wondering whether it should be "libdir"? > I was wondering also whether it would make sense to have a "libpgport.so"? > > It fixes various macros which are used by contrib makefiles, especially > libpq_*dir and LDFLAGS when used under PGXS. It seems to me that they are > needed to > > It adds the ability to test and use PGXS with contribs, with "make > USE_PGXS=1". Without the macro, this is exactly as before, there should be > no difference, esp. wrt the vpath feature that seemed broken by previous > submission. So it should not harm anybody, and it is useful at least to me. > > It fixes some inconsistencies in various contrib makefiles > (useless override, ":=" instead of "="). Fabien COELHO
* Replace TupleTableSlot convention for whole-row variables and functionTom Lane2004-04-011-31/+14
| | | | | | | | results with tuples as ordinary varlena Datums. This commit does not in itself do much for us, except eliminate the horrid memory leak associated with evaluation of whole-row variables. However, it lays the groundwork for allowing composite types as table columns, and perhaps some other useful features as well. Per my proposal of a few days ago.
* Added new versions of dblink, dblink_exec, dblink_open, dblink_close,Joe Conway2004-03-079-185/+556
| | | | | | and, dblink_fetch -- allows ERROR on remote side of connection to throw NOTICE locally instead of ERROR. Also removed documentation for previously deprecated, now removed, functions.
* When returning type "record", replace use of pgresultGetTupleDescJoe Conway2004-02-241-60/+22
| | | | | | | | with ReturnSetInfo->expectedDesc. This allows custom datatypes (e.g. from tsearch2) to be returned at runtime. Previous behavior depended on the type oid to match between the remote and local database, which obviously doesn't work well for custom types. Per report from Mark Gibson.
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-291-1/+1
|
* Fix regression in dblink_disconnect() reported by Eduardo Stern:Joe Conway2003-11-283-5/+5
| | | | | | persistent_conn was left dangling after a disconnect in the unnamed connection case, causing a subsequent disconnect to crash the backend.
* Added missing SPI_finish() calls to get_tuple_of_interest(). Fixes bugJoe Conway2003-11-261-0/+3
| | | | reported by Andrea Grassi.
* Cross-data-type comparisons are now indexable by btrees, pursuant to myTom Lane2003-11-121-4/+4
| | | | | | | | | | pghackers proposal of 8-Nov. All the existing cross-type comparison operators (int2/int4/int8 and float4/float8) have appropriate support. The original proposal of storing the right-hand-side datatype as part of the primary key for pg_amop and pg_amproc got modified a bit in the event; it is easier to store zero as the 'default' case and only store a nonzero when the operator is actually cross-type. Along the way, remove the long-since-defunct bigbox_ops operator class.
* Add operator strategy and comparison-value datatype fields to ScanKey.Tom Lane2003-11-091-2/+4
| | | | | | | | | | | Remove the 'strategy map' code, which was a large amount of mechanism that no longer had any use except reverse-mapping from procedure OID to strategy number. Passing the strategy number to the index AM in the first place is simpler and faster. This is a preliminary step in planned support for cross-datatype index operations. I'm committing it now since the ScanKeyEntryInitialize() API change touches quite a lot of files, and I want to commit those changes before the tree drifts under me.
* expected results for dblink test seem to be out of date ...Tom Lane2003-09-141-2/+6
|
* Fix some copyright notices that weren't updated. Improve copyright toolTom Lane2003-08-043-3/+3
| | | | so it won't miss 'em again.
* pgindent run.Bruce Momjian2003-08-041-82/+81
|
* Error message editing in contrib (mostly by Joe Conway --- thanks Joe!)Tom Lane2003-07-243-107/+183
|
* Please apply attached patch to contrib/dblink. It adds named persistentBruce Momjian2003-06-2510-614/+855
| | | | | | connections to dblink. Shridhar Daithanka
* Replace cryptic 'Unknown kind of return type' messages with somethingTom Lane2003-06-151-6/+2
| | | | hopefully a little more useful.
* Replace functional-index facility with expressional indexes. Any columnTom Lane2003-05-281-4/+1
| | | | | | | | | | | of an index can now be a computed expression instead of a simple variable. Restrictions on expressions are the same as for predicates (only immutable functions, no sub-selects). This fixes problems recently introduced with inlining SQL functions, because the inlining transformation is applied to both expression trees so the planner can still match them up. Along the way, improve efficiency of handling index predicates (both predicates and index expressions are now cached by the relcache) and fix 7.3 oversight that didn't record dependencies of predicate expressions.
* Backend support for autocommit removed, per recent discussions. TheTom Lane2003-05-142-9/+8
| | | | | | only remnant of this failed experiment is that the server will take SET AUTOCOMMIT TO ON. Still TODO: provide some client-side autocommit logic in libpq.
* Fix inappropriate quoting in dblink. From Joe Conway.Tom Lane2002-11-234-12/+116
|
* Add new palloc0 call as merge of palloc and MemSet(0).Bruce Momjian2002-11-131-2/+1
|
* Back out use of palloc0 in place if palloc/MemSet. Seems constant lenBruce Momjian2002-11-111-1/+2
| | | | to MemSet is a performance boost.
* Merge palloc()/MemSet(0) calls into a single palloc0() call.Bruce Momjian2002-11-101-2/+1
|
* Fix dblink regression test so that it works when repeated: don'tTom Lane2002-11-032-81/+21
| | | | | create a second database, just loop back to 'regression'. Patch from Joe Conway 10/22/02.
* Add DLLIMPORT declarations needed by contrib modules.Peter Eisentraut2002-10-211-2/+0
|
* SET autocommit no longer needed in /contrib because pg_regress.sh doesBruce Momjian2002-10-212-3/+0
| | | | it automatically now on regression session startup.
* Clean up for dblink autocommit OFF handling.Bruce Momjian2002-10-182-2/+4
|
* Update /contrib for "autocommit TO 'on'".Bruce Momjian2002-10-183-156/+208
| | | | | | | | | | Create objects in public schema. Make spacing/capitalization consistent. Remove transaction block use for object creation. Remove unneeded function GRANTs.
* Tweak dblink functions to use int4 arguments instead of int2,Tom Lane2002-09-232-12/+30
| | | | to avoid having to write explicit casts. From Joe Conway.
* Simplify handling of second database for dblink tests.Tom Lane2002-09-142-79/+43
|
* The attached adds GRANTs to PUBLIC for dblink functions, removes theTom Lane2002-09-145-85/+198
| | | | | | | | | | non-standard regression test, and adds standard installcheck regression test support. The test creates a second database (regression_slave) and drops it again, in order to avoid the cheesy-ness of connecting back to the same database ;-) Joe Conway
* Remove include of libpq-int.h --- dblink.c should not be (and was not)Tom Lane2002-09-051-1/+1
| | | | depending on libpq internals.
* Be careful to include postgres.h *before* any system headers, to ensureTom Lane2002-09-051-2/+1
| | | | | | that the right flavors of largefile-related definitions are seen. Most of these changes are probably unnecessary, but better safe than sorry.
* pgindent run.Bruce Momjian2002-09-042-269/+288
|
* Clean out cruft left by nonstandard test procedure.Tom Lane2002-09-031-1/+3
|
* last-minute CreateTemplateTupleDesc fixes.Tom Lane2002-09-031-4/+4
|
* Add missing dblink files.Bruce Momjian2002-09-029-0/+903
|
* Attached is a fairly sizeable update to contrib/dblink. I'd love to getBruce Momjian2002-09-024-707/+955
| | | | | | | | | | | | | | review/feedback if anyone is interested and can spend the time. But I'd also love to get this committed and address changes as incremental patches ;-), so if there are no objections, please apply. Below I'll give a synopsis of the changes. More detailed descriptions are now in a new doc directory under contrib/dblink. There is also a new dblink.test.sql file which will give a pretty good overview of the functions and their use. Joe Conway