Commit Graph

15245 Commits

Author SHA1 Message Date
Tom Lane 38d9919d1a Now that fastpath protocol allows null arguments to be passed,
fastpath.c had better check for strict functions.
2003-05-09 18:18:54 +00:00
Tom Lane 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).
2003-05-09 18:08:48 +00:00
Bruce Momjian d85a0a6bef More cleanups now that we have crypt(). 2003-05-09 16:59:43 +00:00
Bruce Momjian 384bbdd0e1 autoconf run for crypt(). 2003-05-09 16:52:48 +00:00
Bruce Momjian 66e0a8cb39 Add crypt() to /port for Win32. 2003-05-09 16:52:11 +00:00
Bruce Momjian 89eae96b2f Remove rint() prototype from QNX. 2003-05-09 16:35:57 +00:00
Bruce Momjian 3afb84cd0f Remove another old rint() replacement. 2003-05-09 16:31:24 +00:00
Bruce Momjian 0afe5417d7 Add rint() to /port, remove from qnx/. 2003-05-09 16:26:29 +00:00
Bruce Momjian 995773be1c Pass canAcceptConnections to exec'ed backend, for Jan. 2003-05-09 15:57:24 +00:00
Tom Lane 5ecd4e3f30 Binary send/receive routines for a few basic datatypes --- enough for
testing purposes.
2003-05-09 15:44:42 +00:00
Bruce Momjian 4207d6bf30 Add opendir/readdir/closedir() for Win32.
Keep SRA copyright on file because it contains BSD license clause.
2003-05-09 01:16:29 +00:00
Tom Lane 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.
2003-05-08 22:19:58 +00:00
Bruce Momjian f2c7a27635 Write non-defaults file before signalling the children to reread it. 2003-05-08 20:43:07 +00:00
Bruce Momjian 789a5b340c Move attached to shared memory out into a separate function for clarity. 2003-05-08 19:17:07 +00:00
Tom Lane 075a0078df I think we're done with protocol instability, so mark server and libpq
as speaking the one true 3.0 protocol.
2003-05-08 18:33:39 +00:00
Tom Lane 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.
2003-05-08 18:16:37 +00:00
Bruce Momjian 5e7a5c9511 Pass shared memory address on command line to exec'ed backend.
Allow backends to attached to specified shared memory address.
2003-05-08 14:49:04 +00:00
Tom Lane 4e08d35e7d Fix documentation problem pointed out by Barry Lind: code expected a
terminating zero byte in StartupMessage, docs didn't mention it.
2003-05-08 14:35:24 +00:00
Tom Lane 1718f4c66c Update COPY BINARY file format spec to reflect recent decisions about
external representation of binary data.
2003-05-07 22:23:27 +00:00
Tom Lane 2de6da832f Revise protocol doc for recently-agreed modifications. This is the
first version of the 3.0 protocol that can be considered non-draft.
2003-05-07 21:46:15 +00:00
Bruce Momjian 07d35e4277 Change alternate database location patch to test for symlink() rather
than WIN32.
2003-05-07 03:47:08 +00:00
Tom Lane 6165a278e5 Fix erroneous example, per Tim Knowles. 2003-05-07 03:41:31 +00:00
Barry Lind 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.

 Modified Files:
 	jdbc/org/postgresql/core/BaseStatement.java
 	jdbc/org/postgresql/core/QueryExecutor.java
 	jdbc/org/postgresql/jdbc3/AbstractJdbc3Connection.java
2003-05-07 03:03:30 +00:00
Bruce Momjian d9fd7d12f6 Pass shared memory id and socket descriptor number on command line for
fork/exec.
2003-05-06 23:34:56 +00:00
Bruce Momjian e8f4f2f92d Properly test for buggy flex 2.5.3. 2003-05-06 23:33:52 +00:00
Tom Lane efa58e105d Minor editorializing. 2003-05-06 23:10:04 +00:00
Tom Lane 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.
2003-05-06 21:51:42 +00:00
Tom Lane 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.
2003-05-06 21:01:04 +00:00
Tom Lane 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.
2003-05-06 20:26:28 +00:00
Michael Meskes 299fbb4b37 Added rfmtlong compatibility function. 2003-05-06 09:48:25 +00:00
Bruce Momjian 3ad406bbc9 Rename internal variables DBName|dbName to dbname, for consistency. 2003-05-06 05:15:45 +00:00
Bruce Momjian 77a0219ab1 Comment out some of the conditional tests until we have exec().
Reorder non-default variable loading until PGDATA is defined.
2003-05-06 04:16:35 +00:00
Tom Lane 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.
2003-05-06 00:20:33 +00:00
Tom Lane 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.
2003-05-05 17:57:47 +00:00
Tom Lane 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.
2003-05-05 16:46:28 +00:00
Tom Lane ea7896bf58 Provide a real link to CREATE SEQUENCE's reference page in nextval/setval
discussion.
2003-05-05 15:08:49 +00:00
Tom Lane e3ed942e3b Not sure why parser() was still doing clearerr(stdin) ... but it's
*got* to be pointless.
2003-05-05 01:59:02 +00:00
Tom Lane 16503e6fa4 Extended query protocol: parse, bind, execute, describe FE/BE messages.
Only lightly tested as yet, since libpq doesn't know anything about 'em.
2003-05-05 00:44:56 +00:00
Bruce Momjian a59793f82c Disable alternate locations on Win32 because it doesn't support symlinks. 2003-05-04 04:42:52 +00:00
Tom Lane 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.
2003-05-04 04:30:15 +00:00
Peter Eisentraut d1b4327d02 Last round of reference page editing. 2003-05-04 02:23:16 +00:00
Tom Lane 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.

Unrelated change in same area: accept GLOBAL TEMP/TEMPORARY as a synonym
for TEMPORARY, as per pgsql-hackers discussion of 15-Apr.  We previously
rejected it, but that was based on a misreading of the spec --- SQL92's
GLOBAL temp tables are really closer to what we have than their LOCAL ones.
2003-05-04 00:03:55 +00:00
Tom Lane 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.
2003-05-03 22:18:59 +00:00
Barry Lind 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);

Modified Files:
 	jdbc/org/postgresql/core/BaseStatement.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1ResultSet.java
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1CallableStatement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1PreparedStatement.java
 	jdbc/org/postgresql/jdbc1/Jdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/Jdbc2CallableStatement.java
 	jdbc/org/postgresql/jdbc2/Jdbc2PreparedStatement.java
 	jdbc/org/postgresql/jdbc2/Jdbc2Statement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3CallableStatement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3PreparedStatement.java
 	jdbc/org/postgresql/jdbc3/Jdbc3Statement.java
 Added Files:
 	jdbc/org/postgresql/PGRefCursorResultSet.java
 	jdbc/org/postgresql/jdbc1/Jdbc1RefCursorResultSet.java
 	jdbc/org/postgresql/jdbc2/Jdbc2RefCursorResultSet.java
 	jdbc/org/postgresql/jdbc3/Jdbc3RefCursorResultSet.java
 	jdbc/org/postgresql/test/jdbc2/RefCursorTest.java
2003-05-03 20:40:45 +00:00
Bruce Momjian 721996d889 Cleanup patch for exec() handling. 2003-05-03 05:13:20 +00:00
Bruce Momjian a7fd03e1de Handle clog structure in shared memory in exec() case, for Win32. 2003-05-03 03:52:07 +00:00
Bruce Momjian 36fa297497 SECOND ATTEMPT
Dump/read non-default GUC values for use by exec'ed backend, for Win32.
2003-05-02 22:02:47 +00:00
Bruce Momjian 9f0d69f527 Back out second part of patch. 2003-05-02 22:01:51 +00:00
Bruce Momjian a2e038fbee Back out last commit --- wrong patch. 2003-05-02 21:59:31 +00:00
Bruce Momjian fb1f7ccec5 Dump/read non-default GUC values for use by exec'ed backends, for Win32. 2003-05-02 21:52:42 +00:00