Commit Graph

  • b02832719c Avoid unnecessary copying of parameter values in BIND. This allows efficient insertion of large bytea values through the BIND interface. Tom Lane 2003-05-12 16:48:17 +00:00
  • 3ffaf20461 Apply fixes for problems with dropped columns whose types have also been dropped. Add regression test, too. Tom Lane 2003-05-12 00:17:34 +00:00
  • d97c9b3662 Apply fixes for problems with dropped columns whose types have also been dropped. The simplest fix for INSERT/UPDATE cases turns out to be for preptlist.c to insert NULLs of a known-good type (I used INT4) rather than making them match the deleted column's type. Since the representation of NULL is actually datatype-independent, this should work fine. I also re-reverted the patch to disable the use_physical_tlist optimization in the presence of dropped columns. It still doesn't look worth the trouble to be smarter, if there are no other bugs to fix. Added a regression test to catch future problems in this area. Tom Lane 2003-05-12 00:17:03 +00:00
  • a7c50cd92b Finish removing HPUXMATHLIB. Tom Lane 2003-05-11 20:50:53 +00:00
  • 6f261461c1 Revert previous change --- turns out the underlying problem affects more cases than I thought, so ExecTypeFromTL() will have to be fixed anyway. Tom Lane 2003-05-11 20:25:50 +00:00
  • 8f2e53bc10 Disable the recently-added use_physical_tlist optimization in cases where the table contains dropped columns. If the columns are dropped, then their types may be gone as well, which causes ExecTypeFromTL() to fail if the dropped columns appear in a plan node's tlist. This could be worked around but I don't think the optimization is valuable enough to be worth the trouble. Tom Lane 2003-05-11 15:03:52 +00:00
  • a4e775a263 Make use of new error context stack mechanism to allow random errors detected during buffer dump to be labeled with the buffer location. For example, if a page LSN is clobbered, we now produce something like ERROR: XLogFlush: request 2C000000/8468EC8 is not satisfied --- flushed only to 0/8468EF0 CONTEXT: writing block 0 of relation 428946/566240 whereas before there was no convenient way to find out which page had been trashed. Tom Lane 2003-05-10 19:04:30 +00:00
  • ecc8c3652e In child-crashed log messages, identify a checkpoint process as such instead of calling it a 'server process'. Tom Lane 2003-05-10 18:15:42 +00:00
  • 016e059fcf Adjust CreateCheckpoint so that buffer dumping activities and cleanup of dead xlog segments are not considered part of a critical section. It is not necessary to force a database-wide panic if we get a failure in these operations. Per recent trouble reports. Tom Lane 2003-05-10 18:01:49 +00:00
  • 8d86a96068 Adjust CreateCheckpoint so that buffer dumping activities and cleanup of dead xlog segments are not considered part of a critical section. It is not necessary to force a database-wide panic if we get a failure in these operations. Per recent trouble reports. Tom Lane 2003-05-10 18:01:31 +00:00
  • 199f24e19d More crypt() cleanup. Bruce Momjian 2003-05-10 04:06:55 +00:00
  • 37627eb571 Remove HPUX 9 rint() test. Bruce Momjian 2003-05-10 04:03:37 +00:00
  • cb8b1299a3 Add Makefile rules for new crypt/rint() /port functions. Add include for rint prototype. Bruce Momjian 2003-05-10 02:05:50 +00:00
  • ba1e066e46 Implement array_send/array_recv (binary I/O for arrays). This exposed the folly of not passing element type to typsend/typreceive, so fix that. Tom Lane 2003-05-09 23:01:45 +00:00
  • b1ee615a7f COPY BINARY uses the new binary I/O routines. Update a few more datatypes so that COPY BINARY regression test passes. Tom Lane 2003-05-09 21:19:50 +00:00
  • 38d9919d1a Now that fastpath protocol allows null arguments to be passed, fastpath.c had better check for strict functions. Tom Lane 2003-05-09 18:18:54 +00:00
  • 0ac6298bb8 Implement new-protocol binary I/O support in DataRow, Bind, and FunctionCall messages. Binary I/O is now up and working, but only for a small set of datatypes (integers, text, bytea). Tom Lane 2003-05-09 18:08:48 +00:00
  • d85a0a6bef More cleanups now that we have crypt(). Bruce Momjian 2003-05-09 16:59:43 +00:00
  • 384bbdd0e1 autoconf run for crypt(). Bruce Momjian 2003-05-09 16:52:48 +00:00
  • 66e0a8cb39 Add crypt() to /port for Win32. Bruce Momjian 2003-05-09 16:52:11 +00:00
  • 89eae96b2f Remove rint() prototype from QNX. Bruce Momjian 2003-05-09 16:35:57 +00:00
  • 3afb84cd0f Remove another old rint() replacement. Bruce Momjian 2003-05-09 16:31:24 +00:00
  • 0afe5417d7 Add rint() to /port, remove from qnx/. Bruce Momjian 2003-05-09 16:26:29 +00:00
  • 995773be1c Pass canAcceptConnections to exec'ed backend, for Jan. Bruce Momjian 2003-05-09 15:57:24 +00:00
  • 5ecd4e3f30 Binary send/receive routines for a few basic datatypes --- enough for testing purposes. Tom Lane 2003-05-09 15:44:42 +00:00
  • 4207d6bf30 Add opendir/readdir/closedir() for Win32. Bruce Momjian 2003-05-09 01:16:29 +00:00
  • 45d04099df Reinstate pg_type's typsend and typreceive columns. They don't do much yet, but they're there. Also some editorial work on CREATE TYPE reference page. Tom Lane 2003-05-08 22:19:58 +00:00
  • f2c7a27635 Write non-defaults file before signalling the children to reread it. Bruce Momjian 2003-05-08 20:43:07 +00:00
  • 789a5b340c Move attached to shared memory out into a separate function for clarity. Bruce Momjian 2003-05-08 19:17:07 +00:00
  • 075a0078df I think we're done with protocol instability, so mark server and libpq as speaking the one true 3.0 protocol. Tom Lane 2003-05-08 18:33:39 +00:00
  • c0a8c3ac13 Update 3.0 protocol support to match recent agreements about how to handle multiple 'formats' for data I/O. Restructure CommandDest and DestReceiver stuff one more time (it's finally starting to look a bit clean though). Code now matches latest 3.0 protocol document as far as message formats go --- but there is no support for binary I/O yet. Tom Lane 2003-05-08 18:16:37 +00:00
  • 5e7a5c9511 Pass shared memory address on command line to exec'ed backend. Bruce Momjian 2003-05-08 14:49:04 +00:00
  • 4e08d35e7d Fix documentation problem pointed out by Barry Lind: code expected a terminating zero byte in StartupMessage, docs didn't mention it. Tom Lane 2003-05-08 14:35:24 +00:00
  • 1718f4c66c Update COPY BINARY file format spec to reflect recent decisions about external representation of binary data. Tom Lane 2003-05-07 22:23:27 +00:00
  • 2de6da832f Revise protocol doc for recently-agreed modifications. This is the first version of the 3.0 protocol that can be considered non-draft. Tom Lane 2003-05-07 21:46:15 +00:00
  • f52c9c6fb6 Be more precise about check for flex 2.5.3, backpatched to 7.3.X. Bruce Momjian 2003-05-07 04:49:02 +00:00
  • 07d35e4277 Change alternate database location patch to test for symlink() rather than WIN32. Bruce Momjian 2003-05-07 03:47:08 +00:00
  • 6165a278e5 Fix erroneous example, per Tim Knowles. Tom Lane 2003-05-07 03:41:31 +00:00
  • 137b123fc7 Fixed bug with Warnings. Warnings are not added to the Statement instead of the connection when appropriate. This checkin also adds the type map for jdbc3, however currently it is identical to the jdbc2 mapping. Barry Lind 2003-05-07 03:03:30 +00:00
  • d9fd7d12f6 Pass shared memory id and socket descriptor number on command line for fork/exec. Bruce Momjian 2003-05-06 23:34:56 +00:00
  • e8f4f2f92d Properly test for buggy flex 2.5.3. Bruce Momjian 2003-05-06 23:33:52 +00:00
  • efa58e105d Minor editorializing. Tom Lane 2003-05-06 23:10:04 +00:00
  • 755d191700 Add display of eventual result RowDescription (if any) to the output of Describe on a prepared statement. This was in the original 3.0 protocol proposal, but I took it out for reasons that seemed good at the time. Put it back per yesterday's pghackers discussion. Tom Lane 2003-05-06 21:51:42 +00:00
  • 8f6a6b7e9a Ensure that an Execute operation can't send tuples in cases where Describe would claim that no tuples will be returned. Only affects SELECTs added to non-SELECT base queries by rewrite rules. If you want to see the output of such a select, you gotta use 'simple Query' protocol. Tom Lane 2003-05-06 21:01:04 +00:00
  • 79913910d4 Restructure command destination handling so that we pass around DestReceiver pointers instead of just CommandDest values. The DestReceiver is made at the point where the destination is selected, rather than deep inside the executor. This cleans up the original kluge implementation of tstoreReceiver.c, and makes it easy to support retrieving results from utility statements inside portals. Thus, you can now do fun things like Bind and Execute a FETCH or EXPLAIN command, and it'll all work as expected (e.g., you can Describe the portal, or use Execute's count parameter to suspend the output partway through). Implementation involves stuffing the utility command's output into a Tuplestore, which would be kind of annoying for huge output sets, but should be quite acceptable for typical uses of utility commands. Tom Lane 2003-05-06 20:26:28 +00:00
  • 299fbb4b37 Added rfmtlong compatibility function. Michael Meskes 2003-05-06 09:48:25 +00:00
  • 3ad406bbc9 Rename internal variables DBName|dbName to dbname, for consistency. Bruce Momjian 2003-05-06 05:15:45 +00:00
  • 77a0219ab1 Comment out some of the conditional tests until we have exec(). Bruce Momjian 2003-05-06 04:16:35 +00:00
  • 2cf57c8f8d Implement feature of new FE/BE protocol whereby RowDescription identifies the column by table OID and column number, if it's a simple column reference. Along the way, get rid of reskey/reskeyop fields in Resdoms. Turns out that representation was not convenient for either the planner or the executor; we can make the planner deliver exactly what the executor wants with no more effort. initdb forced due to change in stored rule representation. Tom Lane 2003-05-06 00:20:33 +00:00
  • 94a3c60324 Ditch ExecGetTupType() in favor of the much simpler ExecGetResultType(), which does the same thing. Perhaps at one time there was a reason to allow plan nodes to store their result types in different places, but AFAICT that's been unnecessary for a good while. Tom Lane 2003-05-05 17:57:47 +00:00
  • 20aea2ec7b Alter plpgsql's lexer so that yylineno and yymore are not used. This avoids 'input buffer overflow' failure on long literals, improves performance, gives the right answer for line position in functions containing multiline literals, suppresses annoying compiler warnings, and generally is so much better I wonder why we didn't do it before. Tom Lane 2003-05-05 16:46:28 +00:00
  • ea7896bf58 Provide a real link to CREATE SEQUENCE's reference page in nextval/setval discussion. Tom Lane 2003-05-05 15:08:49 +00:00
  • e3ed942e3b Not sure why parser() was still doing clearerr(stdin) ... but it's *got* to be pointless. Tom Lane 2003-05-05 01:59:02 +00:00
  • 16503e6fa4 Extended query protocol: parse, bind, execute, describe FE/BE messages. Only lightly tested as yet, since libpq doesn't know anything about 'em. Tom Lane 2003-05-05 00:44:56 +00:00
  • a59793f82c Disable alternate locations on Win32 because it doesn't support symlinks. Bruce Momjian 2003-05-04 04:42:52 +00:00
  • c04e80cf87 Allow 60 in seconds fields of timestamp, time, interval input values. Per recent discussion on pgsql-general, this is appropriate for spec compliance, and has the nice side-effect of easing porting from old pg_dump files that exhibit the 59.999=>60.000 roundoff problem. Tom Lane 2003-05-04 04:30:35 +00:00
  • 50ed78b805 Allow 60 in seconds fields of timestamp, time, interval input values. Per recent discussion on pgsql-general, this is appropriate for spec compliance, and has the nice side-effect of easing porting from old pg_dump files that exhibit the 59.999=>60.000 roundoff problem. Tom Lane 2003-05-04 04:30:15 +00:00
  • d1b4327d02 Last round of reference page editing. Peter Eisentraut 2003-05-04 02:23:16 +00:00
  • f1b3af29c1 When a TIMESTAMP, TIME, or INTERVAL precision is specified larger than our implementation limits, do not issue an ERROR; instead issue a NOTICE and use the max supported value. Per pgsql-general discussion of 28-Apr, this is needed to allow easy porting from pre-7.3 releases where the limits were higher. Tom Lane 2003-05-04 00:04:10 +00:00
  • ac5fdea687 When a TIMESTAMP, TIME, or INTERVAL precision is specified larger than our implementation limits, do not issue an ERROR; instead issue a NOTICE and use the max supported value. Per pgsql-general discussion of 28-Apr, this is needed to allow easy porting from pre-7.3 releases where the limits were higher. Tom Lane 2003-05-04 00:03:55 +00:00
  • fd9dd1b964 Fix erroneous space calculation leading to core dump in dumpProcLangs, per report from Olivier Prenant. Also fix off-by-one space calculation in ReadToc; this woould not have hurt us until we had more than 100 dependencies for a single object, but wrong is wrong. Tom Lane 2003-05-03 22:19:18 +00:00
  • 228697179a Fix erroneous space calculation leading to core dump in dumpProcLangs, per report from Olivier Prenant. Also fix off-by-one space calculation in ReadToc; this woould not have hurt us until we had more than 100 dependencies for a single object, but wrong is wrong. Tom Lane 2003-05-03 22:18:59 +00:00
  • 5295fffc26 Patch to fix up LONGVARBINARY support submitted by Amit Gollapudi (agollapudi@demandsolutions.com). Also applied the RefCursor support patch by Nic Ferrier. This patch allows you too return a get a result set from a function that returns a refcursor. For example: call.registerOutParameter(1, Types.OTHER); call.execute(); ResultSet rs = (ResultSet) call.getObject(1); Barry Lind 2003-05-03 20:40:45 +00:00
  • 721996d889 Cleanup patch for exec() handling. Bruce Momjian 2003-05-03 05:13:20 +00:00
  • a7fd03e1de Handle clog structure in shared memory in exec() case, for Win32. Bruce Momjian 2003-05-03 03:52:07 +00:00
  • 36fa297497 SECOND ATTEMPT Bruce Momjian 2003-05-02 22:02:47 +00:00
  • 9f0d69f527 Back out second part of patch. Bruce Momjian 2003-05-02 22:01:51 +00:00
  • a2e038fbee Back out last commit --- wrong patch. Bruce Momjian 2003-05-02 21:59:31 +00:00
  • fb1f7ccec5 Dump/read non-default GUC values for use by exec'ed backends, for Win32. Bruce Momjian 2003-05-02 21:52:42 +00:00
  • de28dc9a04 Portal and memory management infrastructure for extended query protocol. Both plannable queries and utility commands are now always executed within Portals, which have been revamped so that they can handle the load (they used to be good only for single SELECT queries). Restructure code to push command-completion-tag selection logic out of postgres.c, so that it won't have to be duplicated between simple and extended queries. initdb forced due to addition of a field to Query nodes. Tom Lane 2003-05-02 20:54:36 +00:00
  • 1940434f1e Repair sloppiness about where cached mergeclause pathkeys are allocated. Without this fix, CVS tip dumps core when running the regression tests with geqo_threshold = 2. I would think that a similar patch might be needed in 7.3, but cannot duplicate the failure in that branch --- so for now, leave well enough alone. Tom Lane 2003-05-02 19:48:53 +00:00
  • f7d836212a Fixed double definition of ecpg_compat_mode. Michael Meskes 2003-05-02 14:43:25 +00:00
  • 9e9d8d54e3 Added an option to force ecpg to also parse files includes via '#include' and some more Informix stuff. Michael Meskes 2003-05-01 17:16:57 +00:00
  • cffded96ea Documentation refers to box() function where it should say box_intersect(). Thanks to Wes Sheldah for finding this one. Tom Lane 2003-05-01 00:57:05 +00:00
  • 0c57d69dd7 Update to describe new set of globally-known contexts planned for support of extended query features in new FE/BE protocol. TransactionCommandContext is gone (PortalContext replaces it for some purposes), and QueryContext has taken on a new meaning (MessageContext plays its old role). Tom Lane 2003-04-30 19:04:12 +00:00
  • aa282d4446 Infrastructure for deducing Param types from context, in the same way that the types of untyped string-literal constants are deduced (ie, when coerce_type is applied to 'em, that's what the type must be). Remove the ancient hack of storing the input Param-types array as a global variable, and put the info into ParseState instead. This touches a lot of files because of adjustment of routine parameter lists, but it's really not a large patch. Note: PREPARE statement still insists on exact specification of parameter types, but that could easily be relaxed now, if we wanted to do so. Tom Lane 2003-04-29 22:13:11 +00:00
  • 19141f5584 Remove unneeded define. Bruce Momjian 2003-04-29 18:25:54 +00:00
  • 4a5f38c4e6 Code review for holdable-cursors patch. Fix error recovery, memory context sloppiness, some other things. Includes Neil's mopup patch of 22-Apr. Tom Lane 2003-04-29 03:21:30 +00:00
  • 6a17d226b5 Update German FAQ, from Ian Barwick Bruce Momjian 2003-04-28 22:40:38 +00:00
  • eea36f661c Minor wordsmithing on .pgpass description. Tom Lane 2003-04-28 19:30:49 +00:00
  • 05e7dd3156 Minor improvement in wording. Tom Lane 2003-04-28 05:17:31 +00:00
  • 11def6906b Missed some corner cases (PGSERVICE mostly)... Tom Lane 2003-04-28 04:52:13 +00:00
  • 092133beb3 Okay, I've had it with PQsetdbLogin having slightly different defaults than PQconnectdb. Reimplement the former to use the same code as the latter. Fix documentation omissions while at it. Tom Lane 2003-04-28 04:29:12 +00:00
  • d08007ae77 Make getaddrinfo's behavior with NULL node parameter agree with the Linux man page for it. This error was preventing CVS tip from accepting remote connections. Tom Lane 2003-04-27 23:56:53 +00:00
  • 1045655a25 Prevent coredump in current_schemas() if someone has just deleted a schema that was in our search path. Tom Lane 2003-04-27 23:22:13 +00:00
  • 4089d25175 Fix plpgsql so that variables of composite types (rowtypes) can be declared without having to write %ROWTYPE. If the declared type of a variable is a composite type, it'll be taken to be a row variable automatically. Tom Lane 2003-04-27 22:21:22 +00:00
  • 982430f846 Put back encoding-conversion step in processing of incoming queries; I had inadvertently omitted it while rearranging things to support length-counted incoming messages. Also, change the parser's API back to accepting a 'char *' query string instead of 'StringInfo', as the latter wasn't buying us anything except overhead. (I think when I put it in I had some notion of making the parser API 8-bit-clean, but seeing that flex depends on null-terminated input, that's not really ever gonna happen.) Tom Lane 2003-04-27 20:09:44 +00:00
  • 351372e585 Department of second thoughts: probably still need an IsTransactionState test in there... Tom Lane 2003-04-27 18:01:46 +00:00
  • 5f15fa8d06 Clean up some problems in SetClientEncoding: failed to honor doit flag in all cases, leaked TopMemoryContext memory in others. Make the interaction between SetClientEncoding and InitializeClientEncoding cleaner and better documented. I suspect these changes should be back-patched into 7.3, but will wait on Tatsuo's verification. Tom Lane 2003-04-27 17:31:25 +00:00
  • 20aae3047f Editing of more reference pages. Peter Eisentraut 2003-04-26 23:56:51 +00:00
  • 2df153b0f6 Repair permissions problem in RI triggers: query parsing has to be done as the correct user, not only query execution. Per report from Sean Chittenden. Tom Lane 2003-04-26 22:21:58 +00:00
  • 3a496c8af0 Repair permissions problem in RI triggers: query parsing has to be done as the correct user, not only query execution. Per report from Sean Chittenden. Tom Lane 2003-04-26 22:21:47 +00:00
  • 4db9689d1a Add transaction status field to ReadyForQuery messages, and make room for tableID/columnID in RowDescription. (The latter isn't really implemented yet though --- the backend always sends zeroes, and libpq just throws away the data.) Tom Lane 2003-04-26 20:23:00 +00:00
  • cb1ad8799b Correct oversight in createlang: test for pre-existing handler function was broken by opaque->language_handler change. I see this is already fixed in CVS tip, but must back-patch for 7.3.3. Tom Lane 2003-04-26 15:19:05 +00:00
  • 2b1e36c7c0 Tweak stats collector start logic so that we will not try to spawn a new stats collector oftener than once a minute. Per gripe from Erik Walthinsen 4/25/03. Tom Lane 2003-04-26 02:57:14 +00:00
  • 66e0ea47a0 Back-patch fixes for zero-column tables in COPY, pg_dump. Tom Lane 2003-04-25 22:14:33 +00:00
  • de9c299aba Make [VACUUM] ANALYZE safe on zero-column tables. Tom Lane 2003-04-25 21:29:22 +00:00
  • 9fdb1de3ba Make [VACUUM] ANALYZE safe on zero-column tables. Tom Lane 2003-04-25 21:29:18 +00:00
  • 9cbaf72177 In the continuing saga of FE/BE protocol revisions, add reporting of initial values and runtime changes in selected parameters. This gets rid of the need for an initial 'select pg_client_encoding()' query in libpq, bringing us back to one message transmitted in each direction for a standard connection startup. To allow server version to be sent using the same GUC mechanism that handles other parameters, invent the concept of a never-settable GUC parameter: you can 'show server_version' but it's not settable by any GUC input source. Create 'lc_collate' and 'lc_ctype' never-settable parameters so that people can find out these settings without need for pg_controldata. (These side ideas were all discussed some time ago in pgsql-hackers, but not yet implemented.) Tom Lane 2003-04-25 19:45:10 +00:00
  • a2190c9eb6 Prevent unlink/rename Win32 mapping on frontends. Bruce Momjian 2003-04-25 16:18:40 +00:00