Commit Graph

9074 Commits

Author SHA1 Message Date
Bruce Momjian 09bf48cf79 Improve comments about duplicate files. 2001-11-18 23:02:19 +00:00
Tatsuo Ishii 226211f0af Optimization for bpcharlen, textlen, varcharlen in case of single byte
encodings.
2001-11-18 12:07:07 +00:00
Tom Lane 6b516f5951 Fix performance problems in TOAST compressor. The management of
search lists was broken in such a way that only the most recent
instance of a given hash code would ever be searched, thus possibly
missing longer matches further back.  Fixing this gave 5 to 10%
compression improvement on some text test cases.  Additional small
tweaks to improve speed of inner loops a little bit.  There is no
compatibility issue created by this change, since the compressed data
format and decompression algorithm don't change.
2001-11-17 06:09:30 +00:00
Tom Lane c845b4272c IsSystemRelationName() treats TOAST relations as system relations.
This seems the right thing for most usages, but I notice two places
where it is the wrong thing.  One is that the default permissions on
TOAST rels should be no-access, not world-readable; the other is that
PrepareForTupleInvalidation doesn't really need to spend time looking
at tuples of TOAST relations.
2001-11-16 23:30:35 +00:00
Bruce Momjian aea081bb27 Add missing prototype. 2001-11-16 18:28:16 +00:00
Bruce Momjian 07de4cbbbb Add configure result checks on odbc, per Peter E. 2001-11-16 18:10:04 +00:00
Tom Lane 1ca717f377 plpython security and error handling fixes, from
Kevin Jacobs and Brad McLean.
2001-11-16 18:04:31 +00:00
Tom Lane 100e7f0c9d Once again, Michael has overwritten someone else's patch ... 2001-11-16 17:01:48 +00:00
Peter Eisentraut aff53b27f0 Make the yacc rules safe for parallel make. See discussion on pgsql-patches
and comment in src/backend/parser/Makefile for the technical details.
2001-11-16 16:32:33 +00:00
Tom Lane 7c50767f08 Remove 'triggered data change violation' error check, per recent
discussions in pghackers.
2001-11-16 16:31:16 +00:00
Michael Meskes 7845954e49 Committed again to add the missing files/patches. 2001-11-16 08:36:37 +00:00
Hiroshi Inoue 949af991fc Change SQLDescribeCol so that it returns alias name properly. 2001-11-16 05:55:10 +00:00
Tom Lane 2a4660f5aa Update keyword lists per suggestions by Peter. There are now four
mutually exclusive keyword lists spanning all known keywords ---
including AS.  Moved COALESCE and a few other ColLabels into the
can-be-ColId list.
2001-11-16 04:08:33 +00:00
Tom Lane 4be20187ab Fix some problems in new plpgsql cursor operations, found while trying
to reverse-engineer documentation for them.
2001-11-15 23:31:09 +00:00
Bruce Momjian ea436f9fcf Well the absolute correct solution would involve all of:
int8, int16, int32, int64 and separately uint8, uint16, uint32, uint64

The previous patch grouped:
int8, int16 and int32
uint8, uint16 and uint32
int64 and uint64  <-- this grouping is wrong on AIX 4.3.3 and below

If you prefer to make 4 groups out of this you could apply this patch.

Andreas
2001-11-15 16:35:19 +00:00
Bruce Momjian 2c1784a9c7 Update md5.h because it can't get the value from configure. 2001-11-15 16:16:08 +00:00
Bruce Momjian 6c9b11b35e Fix for AIX compile and unsigned/signed typedefs.
Peter E, Tatsuo, Andreas
2001-11-15 16:09:34 +00:00
Peter Eisentraut a6348ae332 Only use RTLD_GLOBAL when available, which it isn't in older releases of the OS. 2001-11-15 16:08:15 +00:00
Bruce Momjian 1edbd62cac Fix comment at top of file to match file name. 2001-11-15 03:12:53 +00:00
Dave Cramer 80c029190f fixes getIndex to work with forte's transparent persistence 2001-11-14 20:04:00 +00:00
Michael Meskes 32a4c3008f Added Christof's patches. 2001-11-14 11:11:49 +00:00
Barry Lind ebb93323bb Attached is a patch against the CVS repository that fixes the ResultSet absolute() problem.
There's also a little fix for the getRow() method. While fixing
absolute(), I noticed that getRow() wasn't quite following the spec: it
wasn't returning 0 when the ResultSet wasn't positioned on a row.  I've
started a ResultSet test case and included it as well.

Liam Stewart
2001-11-14 04:11:37 +00:00
Bruce Momjian c97a787e85 Update CVS tags. 2001-11-13 22:08:04 +00:00
Bruce Momjian e735112b51 Use better CVS tag. 2001-11-13 22:07:42 +00:00
Bruce Momjian 2ca65f716a Remove md5.c check, add CVS log stamp. Update comments. 2001-11-13 22:06:58 +00:00
Tom Lane 1c2d2dbb67 Give a more intelligible and useful error message for SELECT with no
destination in plpgsql.
2001-11-13 02:05:27 +00:00
Tom Lane a585c20d12 Tweak parser so that there is a defined representation for datatypes
bpchar, bit, numeric with typmod -1.  Alter format_type so that this
representation is printed when the typmod is -1.  This ensures that
tables having such columns can be pg_dump'd and reloaded correctly.
Also, remove the rather useless and non-SQL-compliant default
precision and scale for type NUMERIC.  A numeric column declared as
such (with no precision/scale) will now have typmod -1 which means
that numeric values of any precision/scale can be stored in it,
without conversion to a uniform scale.  This seems significantly
more useful than the former behavior.  Part of response to bug #513.
2001-11-12 21:04:46 +00:00
Tom Lane d4d23852c1 If the alternatives for a CASE construct all have the same typmod,
use that typmod not -1 as the typmod of the CASE result.
Part of response to bug#513.
2001-11-12 20:05:24 +00:00
Tom Lane e433bf5a5e If the inputs of a UNION/INTERSECT/EXCEPT construct all agree on the
typmod of a particular column, mark the output with that same typmod,
not -1 as formerly.  -1 is still used if there is any disagreement.
Part of response to bug#513.
2001-11-12 20:04:20 +00:00
Barry Lind 7a9ef7ee09 fixed bug in ResultSet. Version 1.29 backed out two previous fixes (1.26 and 1.25). This checkin add back those two previous fixes. Problem reported by Daniel Germain 2001-11-12 19:59:46 +00:00
Barry Lind 3a306eefe9 Commit to support MD5 passwords as per the backend for 7.2. This patch was submitted by Jeremy Wohl jeremyw-pgjdbc@igmus.org 2001-11-12 19:11:56 +00:00
Tom Lane 611afd9f4b Repair crash in EvalPlanQual of query involving nestloop with inner
index scan.  Problem was that link to outer tuple wasn't being stored
everyplace it needed to be.
2001-11-12 17:18:06 +00:00
Tom Lane 0f214edeb1 Remove duplicate extern declaration. 2001-11-12 16:34:58 +00:00
Tom Lane 112bd6f06b psql's \do was going out of its way to lie about the result type of
operators.  Should report the declared oprresult type, not the return type
of the underlying proc, which might be only binary-compatible (cf.
textcat entries).
2001-11-12 15:57:08 +00:00
Bruce Momjian e506ca4063 Tables without oids wouldn't be able to be
used inside fk constraints, since some of the checks
in the trigger did a SELECT oid.  Since the oid wasn't
actually used, I changed this to SELECT 1.  My test
case with non-oid tables now works and fk regression
appears to run fine on my machine.

Stephan Szabo
2001-11-12 06:09:09 +00:00
Tom Lane 9371325042 Remove a bunch more no-longer-used stuff in libpq-be.h. 2001-11-12 05:43:25 +00:00
Tom Lane 7be18072db Suppress duplicate error messages in pq_flush. Write error messages to
postmaster log with elog(DEBUG) so that they will be timestamped etc.
Once upon a time I think elog() was unsafe here, but it shouldn't be anymore.
2001-11-12 04:54:08 +00:00
Tom Lane 1131ba3135 send() attempt for IDENT communication should retry on EINTR. 2001-11-12 04:29:23 +00:00
Tom Lane a7f6210de2 The PacketReceive/PacketSend routines aren't used anymore. 2001-11-12 04:19:15 +00:00
Bruce Momjian 215772ae96 Update MD5 documentation. 2001-11-12 03:57:16 +00:00
Bruce Momjian 67a56f2286 Sync up both files. 2001-11-12 02:05:17 +00:00
Bruce Momjian 9937040a02 Add comments and remove CVS tag from md5.c so they remain identical. 2001-11-12 02:00:18 +00:00
Bruce Momjian 36bbb2494e Add comments and remove CVS tag from md5.c so they remain identical. 2001-11-12 01:59:43 +00:00
Bruce Momjian 0611d3980a Update md5 to match. 2001-11-12 01:56:12 +00:00
Bruce Momjian e6e4c45a2a Add comments of duplicate definitions in interfaces/odbc/md5.h. 2001-11-12 01:52:46 +00:00
Bruce Momjian 75bb1e6f5d Add code to check that md5.c files are in sync. 2001-11-12 01:42:03 +00:00
Bruce Momjian a83bd89d00 Indent new rename.c for Tom Lane. 2001-11-12 01:34:50 +00:00
Hiroshi Inoue b52950cc3d Add md5 authentication support thanks to Bruce Momjian. 2001-11-12 00:54:28 +00:00
Tom Lane f14fdad858 Make ALTER TABLE RENAME update foreign-key trigger arguments correctly.
Brent Verner, with review and kibitzing from Tom Lane.
2001-11-12 00:46:36 +00:00
Tom Lane 8bfc437301 Clean up a bunch of ScanKeyEntryInitialize calls that weren't bothering
to apply the proper Datum conversion macros to search key values.
2001-11-12 00:00:55 +00:00
Tom Lane 801a1accca Test program needs to declare MaxBackends, per Bernd Tegge. 2001-11-11 22:12:00 +00:00
Tom Lane 69a59150c2 Defend against brain-dead QNX implementation of qsort().
Per report from Bernd Tegge, 10-Nov-01.
2001-11-11 22:00:25 +00:00
Tom Lane c5c97318f9 In find_mergeclauses_for_pathkeys, it's okay to return multiple merge
clauses per path key.  Indeed, we *must* do so or we will be unable to
form a valid plan for FULL JOIN with overlapping join conditions, eg
select * from a full join b on
a.v1 = b.v1 and a.v2 = b.v2 and a.v1 = b.v2.
2001-11-11 20:33:53 +00:00
Bruce Momjian 4552ddd535 Fix for compiling libpq++ on Solaris with Sun SPRO6U2.
Denis A Ustimenko
2001-11-11 19:20:53 +00:00
Tom Lane ad511a3ff3 sort_inner_and_outer needs a check to ensure that it's consumed all the
mergeclauses in RIGHT/FULL join cases, just like the other routines have.
I'm not quite sure why I thought it didn't need one --- but Nick
Fankhauser's recent bug report proves that it does.
2001-11-11 19:18:54 +00:00
Hiroshi Inoue 8bf1e098dd Use abbreviated connection string more widely.
This seems to fix the trouble with PowerBuilder
reported by Magbus Weber.
2001-11-11 07:24:36 +00:00
Tom Lane 15c21bf8e1 Defend against possibility that SSL error reporting mechanism returns
a NULL pointer.  Per report from Stephen Pillinger 8-Nov-01.
2001-11-11 02:09:05 +00:00
Tom Lane f6ee99a062 Clean up usage-statistics display code (ShowUsage and friends). StatFp
is gone, usage messages now go through elog(DEBUG).
2001-11-10 23:51:14 +00:00
Tom Lane 0c1669c806 Restructure child-exit logging messages for easier translation,
per suggestion from Peter.
2001-11-10 23:06:12 +00:00
Tom Lane ec438886e1 Allow TIMESTAMP, VARCHAR, et al to be used as unquoted column names,
though alas not as unquoted function names.  De-reserve a bunch of
keywords that could have been in ColId rather than ColLabel all along.
Per recent proposal in pgsql-patches.
2001-11-10 22:31:49 +00:00
Dave Cramer be4e5059a2 Jason Davies patch to getImported/getExported keys 2001-11-09 02:57:50 +00:00
Bruce Momjian 77e4fd889c Fix indenting for 'extern "C"' cases. 2001-11-08 20:37:52 +00:00
Bruce Momjian 876c7009fb Make extern C handling more flexible. 2001-11-08 17:03:23 +00:00
Tom Lane 7e16f3c0d8 PostgreSQL works again on Mac OS X 10.1. Hold your nose before
investigating the kluge that makes it so...
2001-11-08 04:24:03 +00:00
Tom Lane 64af43a15f Add casts to suppress compiler warnings observed on Darwin platform
(surprised no one has reported these yet...)
2001-11-08 04:05:13 +00:00
Bruce Momjian c6e25ed1af Fix replacement of extern C string. 2001-11-07 22:10:02 +00:00
Bruce Momjian 1233d4fd6c Fix typo. 2001-11-07 21:29:04 +00:00
Bruce Momjian e644fc25c7 Prevent indenting of 'extern "C"' blocks. 2001-11-07 21:24:28 +00:00
Bruce Momjian e7c788f3a0 Some post pgident run updates,
one fuzzy translation fix, some
other messages tweaking. Theoretically,
should be up-to-date by now.

Please apply to /src/interfaces/libpq/ru.po

--
Serguei A. Mokhov
2001-11-07 03:09:15 +00:00
Tom Lane 27e7ac190e Update for latest version of horology test. 2001-11-06 18:03:48 +00:00
Tom Lane d22e9456a7 Clean up formatting of child process exit-status reports so that they
are correct, consistent, and complete ... motivated by gripe from
Oliver Elphick, but I see someone had already made an incomplete stab
at this.
2001-11-06 18:02:48 +00:00
Thomas G. Lockhart d2ff7e509c Fix last (?) problem with sensitivity to daylight savings time status
when running the regression test. Reported by Tom Lane.
2001-11-06 16:31:13 +00:00
Thomas G. Lockhart 3ea311d4b3 Add British Double Standard Time (BDST) per mailing list report. 2001-11-06 16:29:51 +00:00
Thomas G. Lockhart e160fcd696 Use PostgreSQL's standard declaration for a 32-bit integer to define
the cash data type.
2001-11-06 16:27:31 +00:00
Tom Lane d980ddb544 Add Darwin to list of known systems for ps_status. 2001-11-06 01:15:29 +00:00
Tom Lane ca7578d454 The extra semaphore that proc.c now allocates for checkpoint processes
should be accounted for in the PROC_SEM_MAP_ENTRIES() macro.  Otherwise
the ports that rely on this macro to size data structures are broken.
Mea culpa.
2001-11-06 00:38:26 +00:00
Tom Lane 0053cebea5 Fix coredump in plpgsql when trying to return a rowtype result.
Need to return a TupleTableSlot, not just a bare tuple.
2001-11-05 19:41:56 +00:00
Bruce Momjian ea08e6cd55 New pgindent run with fixes suggested by Tom. Patch manually reviewed,
initdb/regression tests pass.
2001-11-05 17:46:40 +00:00
Hiroshi Inoue 34153b2052 Preparation for the parameter array handling. 2001-11-05 10:35:14 +00:00
Hiroshi Inoue c0b27c4feb 1) Fix a few bugs about SQLGetData()
reported by Mika Mantyla.
2) Timestamp precision.
3) Separate ODBC3.0 files.
2001-11-05 09:46:17 +00:00
Bruce Momjian 0f450dae8b More cleanup for stuff after closing brace in first column. 2001-11-05 06:37:51 +00:00
Bruce Momjian d447dbf392 Handle tabs after closing brace in first column with less indenting. 2001-11-05 05:47:50 +00:00
Bruce Momjian 158129be72 Improve readability of script. 2001-11-05 05:18:43 +00:00
Tom Lane 5251e7b3d0 CREATE TABLE foo (x,y,z) AS SELECT ... can't apply target column names
to the target list in gram.y; it must wait till after expansion of the
target list in analyze.c.  Per bug report 4-Nov:
lx=# CREATE TABLE abc (a char, b char, c char);
CREATE
lx=# CREATE TABLE xyz (x, y, z) AS SELECT * FROM abc;
ERROR:  CREATE TABLE/AS SELECT has mismatched column count
2001-11-05 05:00:14 +00:00
Tom Lane d556920a98 Remove ill-considered Assert. 2001-11-05 01:34:37 +00:00
Bruce Momjian 3bb110ebb3 Pull in variables defined in structs; had too many tabs. 2001-11-04 21:27:41 +00:00
Tom Lane 430cd88a18 Fix now-obsolete comment. 2001-11-04 20:12:57 +00:00
D'Arcy J.M. Cain 568cb6ab5c Version was 3.3 but last released version was 3.1. Setting to match rest
of the documentation in preparation for upcoming release.
2001-11-04 20:11:01 +00:00
Tom Lane fb5f1b2c13 Merge three existing ways of signaling postmaster from child processes,
so that only one signal number is used not three.  Flags in shared
memory tell the reason(s) for the current signal.  This method is
extensible to handle more signal reasons without chewing up even more
signal numbers, but the immediate reason is to keep pg_pwd reloads
separate from SIGHUP processing in the postmaster.
Also clean up some problems in the postmaster with delayed response to
checkpoint status changes --- basically, it wouldn't schedule a checkpoint
if it wasn't getting connection requests on a regular basis.
2001-11-04 19:55:31 +00:00
D'Arcy J.M. Cain 5f067722bf Note that PyGreSQL has been checked against Python 2.1 now. 2001-11-04 19:47:16 +00:00
D'Arcy J.M. Cain 6395d86a9a The "%d", while syntactically correct, was confusing. Added a space to
make it clearer that d was the argument to the format operator.
2001-11-04 19:42:13 +00:00
Philip Warner 1ef62bb6fc - Fix compiler warning in pg_restore
- Fix handling of {data/schema}-only restores when using a full
  backup file; prior version was restoring schema in data-only
  restores. Added enum to make code easier to understand.
2001-11-04 04:05:36 +00:00
Bruce Momjian 7cc8af5563 Got "ADD" to appear only in ALTER TABLE and not CREATE TABLE
UNIQUE-PRIMARY KEY notice message.  This is what Christopher wanted from
his patch.
2001-11-04 03:08:11 +00:00
Bruce Momjian 434077c4e6 Remove "ADD" from TABLE / ADD UNIQUE-PRIMARY error message because the
same code is called for both creation and alter.  Not worth worrying
about.
2001-11-04 02:41:09 +00:00
Bruce Momjian 8ee7c19e3c Require closing paren on line above brace to identify function
difinition, just for formatting workaround, per Tom's discovery.
2001-11-03 22:34:13 +00:00
Bruce Momjian f008976bcd More updates for GNU indent. 2001-11-03 12:34:15 +00:00
Hiroshi Inoue 58df3f785e 1) Improve literal handling in parse_statement().
2) Remove some no longer valid comments.
3) Fix an option dialog setting bug.
4) Fix ODBCVER handling errors.
2001-11-03 06:53:50 +00:00
Bruce Momjian ffba91cd1e Make pgindent use GNU Indent version 2.X better. 2001-11-03 01:49:22 +00:00
Dave Cramer 355cc69dfc proper select for Jason Davies patch to getImportedKeys 2001-11-02 23:51:18 +00:00
Dave Cramer 0b1289e67d proper select for Jason Davies patch to getImportedKeys
fixes for compiling Jason's getImportedKeys, getExportedKeys
2001-11-02 23:50:08 +00:00
Bruce Momjian 04550d3c90 Add check for 'extern "C"' for pgindent. 2001-11-02 23:43:24 +00:00
Tom Lane c42d3b3c24 Windows portability macros SOCK_ERRNO and SOCK_STRERROR should be in
libpq-int.h, not cluttering application namespace in libpq-fe.h.
2001-11-02 20:51:27 +00:00
Tom Lane 9685afb0b2 Add default expressions to INSERTs during planning, not during parse
analysis.  This keeps stored rules from prematurely absorbing default
information, which is necessary for ALTER TABLE SET DEFAULT to work
unsurprisingly with rules.  See pgsql-bugs discussion 24-Oct-01.
2001-11-02 20:23:02 +00:00
Peter Eisentraut a9b6691ae7 updates 2001-11-02 19:16:47 +00:00
Tom Lane 8a069abd18 Fix pg_pwd caching mechanism, which was broken by changes to fork
postmaster children before client auth step.  Postmaster now rereads
pg_pwd on receipt of SIGHUP, the same way that pg_hba.conf is handled.
No cycles need be expended to validate password cache validity during
connection startup.
2001-11-02 18:39:57 +00:00
Tom Lane 6babf6eab7 Suppress compiler warning (only seen in MULTIBYTE case). 2001-11-02 17:00:18 +00:00
Tom Lane 7d05310828 Fix problem reported by Alex Korn: if a relation has been dropped and
recreated since the start of our transaction, our first reference to it
errored out because we'd try to reuse our old relcache entry for it.
Do this by accepting SI inval messages just before relcache search in
heap_openr, so that dead relcache entries will be flushed before we
search.  Also, break heap_open/openr into two pairs of routines,
relation_open(r) and heap_open(r).  The relation_open routines make
no tests on relkind and so can be used to open anything that has a
pg_class entry.  The heap_open routines are wrappers that add a relkind
test to preserve their established behavior.  Use the relation_open
routines in several places that had various kluge solutions for opening
rels that might be either heap or index rels.

Also, remove the old 'heap stats' code that's been superseded by Jan's
stats collector, and clean up some inconsistencies in error reporting
between the different types of ALTER TABLE.
2001-11-02 16:30:29 +00:00
Michael Meskes 5d4b94085e Sync parser yet again. 2001-11-02 15:04:03 +00:00
Tom Lane 3c9b549a75 Minor code cleanups. 2001-11-01 18:10:48 +00:00
Tom Lane 7663e6bb70 Reject tabs and linefeeds in usernames and passwords that are being
stored in pg_pwd, to guard against failures of the sort observed by
Tom Yackel.  Note: in the case of encrypted passwords this is no
restriction, since the string we are interested in is the MD5 hash.
2001-11-01 18:09:58 +00:00
Tom Lane bdea97ea95 Add missing #include. 2001-11-01 06:17:01 +00:00
Tom Lane 4877c59217 Suppress trivial compiler warning. 2001-11-01 05:45:28 +00:00
Barry Lind 8304a395f9 minor improvements on Dave's last checkin 2001-11-01 01:10:13 +00:00
Hiroshi Inoue 01da8e918d Suppress a compiler warning. 2001-10-31 23:54:02 +00:00
Dave Cramer 1da3771b4e changes to support 3rd party ERD tools and staroffice 2001-10-31 20:27:37 +00:00
Dave Cramer af000b7f2e allow null passwords 2001-10-31 20:26:01 +00:00
Dave Cramer 29916087d0 added dummy login 2001-10-31 20:24:32 +00:00
Thomas G. Lockhart c859ff92d0 Fix queries to insulate from daylight savings time. 2001-10-31 14:44:23 +00:00
Bruce Momjian 57584d70fa More *.po cleanups for new spacing. 2001-10-31 05:16:31 +00:00
Bruce Momjian e7fc0604cd Modify *.po files and regression expected output for new clearer error
message spacing.
2001-10-31 05:14:33 +00:00
Bruce Momjian 37bba02bdb Here is an updated version of /src/backend/po/ru.po
which incorporates recent changes by Bruce to
readability of some messages and few more translations.

--
Serguei A. Mokhov
2001-10-31 04:58:36 +00:00
Bruce Momjian 85817580f4 Traditional Chinese error messages for JDBC.
Zhenbang Wei
2001-10-31 04:55:02 +00:00
Bruce Momjian 4911c85e86 Add ALTER TABLE ADD UNIQUE regression tests from Christopher Kings-Lynne.
Add space between slash for ALTER TABLE / ADD ....

Regression and *.po updates to follow.
2001-10-31 04:49:44 +00:00
Bruce Momjian 74c2f8e729 Apply updated PO language patch.
Zhenbang Wei
2001-10-31 04:31:17 +00:00
Bruce Momjian 41b161f0eb PO language update.
forth@pagic.net
2001-10-31 04:20:26 +00:00
Tom Lane 9a88b8a600 Update solaris-1947 variant files for new datetime regression tests.
Results checked by Olivier Prenant.
2001-10-30 22:48:57 +00:00
Tom Lane 96ca8ffebc Fix problems with subselects used in GROUP BY expressions, per gripe
from Philip Warner.  Side effect of change is that GROUP BY expressions
will not be re-evaluated at multiple plan levels anymore, whereas this
sometimes happened with old code.
2001-10-30 19:58:58 +00:00
Barry Lind 512a3aef36 fixed change in behavior introduced in bytea / getBytes changes. This patch reverts back unintentional change in behavior to return raw value even when not bytea column 2001-10-30 06:31:59 +00:00
Bruce Momjian c41b6b1b9c Fix small problem Tom Lane found with pgindent run. 2001-10-30 05:38:56 +00:00
Barry Lind d650a6f580 updated patch from Mark Lillywhite per Tom Lane's comments: subtract VARHDRSZ first then and with 0xffff 2001-10-30 05:09:51 +00:00
Barry Lind d80d4baa09 applied patch from Mark Lillywhite, patch was already applied to jdbc2, this applies same fix to jdbc1 code 2001-10-30 05:05:25 +00:00
Bruce Momjian 8469a33818 Add gp->gr_mem != NULL check for Solaris, per Seth Hettich 2001-10-29 18:06:54 +00:00
Bruce Momjian 40b1403ae8 Check for NULL return from getgrgid(), per Seth Hettich 2001-10-29 17:55:41 +00:00
Tatsuo Ishii f2a2ad59bc Fix bug with illegal call to calloc. 2001-10-29 06:45:32 +00:00
Hiroshi Inoue aaf95b6c86 Change position of a check button in multibyte mode. 2001-10-29 02:51:46 +00:00
Bruce Momjian 6783b2372e Another pgindent run. Fixes enum indenting, and improves #endif
spacing.  Also adds space for one-line comments.
2001-10-28 06:26:15 +00:00
Bruce Momjian c29797deeb Add code to trip trailing newlines in a file. 2001-10-27 13:54:45 +00:00
Bruce Momjian 5ef74fe593 Correct fix for indenting. 2001-10-27 03:31:36 +00:00
Tom Lane 8dcf998dd1 Remove no-longer-needed dependencies on DLSUFFIX. 2001-10-26 20:45:33 +00:00
Bruce Momjian b93939a6a7 Adjust NR tests. More accurate. 2001-10-26 17:54:45 +00:00
Bruce Momjian 8c1f4e574b Add code to not indent enum, per Tom Lane. 2001-10-26 16:21:13 +00:00
Bruce Momjian 99a9f2f6f4 Add ODBC typedefs. 2001-10-26 15:42:54 +00:00
Tom Lane 40ce3a93f1 Remove 294 reduce/reduce conflicts. 2001-10-25 20:56:53 +00:00
Tom Lane 22d9e91219 Fix a couple of places where lack of parenthesization of a cast
causes pgindent to make weird formatting decisions.  Easiest fix
seems to be to put in the extra parens...
2001-10-25 20:37:30 +00:00
Bruce Momjian 80b9a00439 Add blank line before #endif to #endif's at the end of the file. 2001-10-25 19:57:03 +00:00
Bruce Momjian 3231341eed Add slash for comment spacing, for Tom. 2001-10-25 19:22:05 +00:00
Bruce Momjian 81d9a9674e Add comment spaces for trailing ) and comment. 2001-10-25 18:44:42 +00:00
Bruce Momjian cae059ba5e Add spacing for single-line comments with trailing semicolon _and_
comma, per Tom.
2001-10-25 18:25:23 +00:00
Tom Lane a0cd991987 Add int2-to-int8 and int8-to-int2 conversion routines. Needed to avoid
breaking existing pg_dump scripts, which try to assign the result of
count(*) to an int2 variable.  catversion bumped.
2001-10-25 14:10:07 +00:00
Tom Lane 92e8282229 Add missing output routine for FkConstraint nodes. 2001-10-25 14:08:11 +00:00
Bruce Momjian 05584c9660 Code cleanup. 2001-10-25 06:27:56 +00:00
Bruce Momjian d2e27b0674 pgjindent jdbc files. First time jdbc files were formatted. 2001-10-25 06:00:05 +00:00
Bruce Momjian b81844b173 pgindent run on all C files. Java run to follow. initdb/regression
tests pass.
2001-10-25 05:50:21 +00:00
Bruce Momjian 59da2105d8 Update to prevent CATALOG() from wrapping. 2001-10-25 05:07:56 +00:00
Bruce Momjian bbc7491de1 Add current typedef symbols to pgindent. 2001-10-25 03:56:35 +00:00
Bruce Momjian fde8edaf53 Add do { ... } while (0) to more bad macros. 2001-10-25 01:29:37 +00:00
Bruce Momjian 309a04f5b8 Add missing "do { ... } while(0)" in ODBC macros and add find_baddefs
script.
2001-10-25 00:50:50 +00:00
Peter Eisentraut 8b4d5c7575 Include locale.h before undefining gettext() to avoid compilation errors
on Solaris.

per report from Lee Kindness, 2001-10-23
2001-10-24 21:49:14 +00:00
Bruce Momjian 6f6d16ab25 All three *.po patches applied.
forth@pagic.net
2001-10-24 17:52:28 +00:00
Bruce Momjian cabe9896bc Here is a patch for DatabaseMetaData to show precision properly. It is
from Mark Lillywhite.  I am adding to the patch queue.
2001-10-24 17:44:28 +00:00
Hiroshi Inoue 0450331526 Allow concurrent index creation for the same table. 2001-10-24 09:28:31 +00:00
Barry Lind 97ab49beb0 fix for a bug in DatabaseMetaData.getIndexInfo(). This fixes a bug reported by tom_falconer@lineone.net. On Sept 7th, he sent a test case to the list demonstrating the bug. His test case now works successfully with this patch 2001-10-24 04:31:50 +00:00
Tom Lane b662e321c5 Forbid the switch combination --clean --create, which is pointless
(why bother dropping individual objects in a just-created database?)
as well as dangerous (as the code stands, the drops will be issued in
the wrong database, namely the one you were originally connected to).
2001-10-23 21:26:44 +00:00
Tom Lane 2628d9b3a4 Document range restriction on bit values used in INTERVAL typmod. 2001-10-23 20:17:27 +00:00
Tom Lane d0667af926 Add support for INTERVAL's new typmod values to format_type. 2001-10-23 20:12:54 +00:00
Tom Lane 01b73d3f27 Fix foreign keys on system columns. 2001-10-23 17:39:03 +00:00
Tom Lane 57dd2ce78a Make SPI's column-accessing functions work for system columns as well as
user columns.  Needed for foreign keys on OID, but useful in general.
2001-10-23 17:38:25 +00:00
Bruce Momjian 8dded696e6 Now I had them reversed. Wow that syntax is error-prone. 2001-10-23 02:50:41 +00:00
Bruce Momjian caafc1c5cc Syntax fix. Can't use #ifdef in gram.y. 2001-10-23 02:47:14 +00:00
Bruce Momjian e1ce520c09 Back out LIMIT #,# removal and mark it as to-be-removed in 7.3. 2001-10-23 02:45:37 +00:00
Tom Lane 087771ae40 Add error checking to PageRepairFragmentation to ensure that it can
never overwrite adjacent pages with copied data, even if page header
and/or item pointers are already corrupt.  Change inspired by trouble
report from Alvaro Herrera.
2001-10-23 02:20:15 +00:00
Tom Lane dab708ea08 Cause transformIndexConstraints() to do the right thing with requests
for indexes on system columns.  Per complaint from Peter.
2001-10-22 22:49:02 +00:00
Tom Lane c59839ac6d Consolidate tables of known system attributes into one table. 2001-10-22 22:47:57 +00:00
Tom Lane b00c6c841f Update for latest fixes. 2001-10-22 19:52:41 +00:00
Tom Lane 94daee3cb7 Further cleanup of ps_status setup code. On platforms where the
environment strings need to be moved around, do so when called from
initial startup (main.c), not in init_ps_status.  This eliminates the
former risk of invalidating saved environment-string pointers, since
no code has yet had a chance to grab any such pointers when main.c
is running.
2001-10-22 19:41:38 +00:00
Tom Lane a19f2605ed Add defenses against invalid operator names passed in CREATE OPERATOR
arguments (where the parser doesn't check them already).  Minor code
cleanups too.
2001-10-22 19:34:13 +00:00
Tom Lane 970a2d1c91 Rebuild cached function definition after CREATE OR REPLACE FUNCTION.
Fix typlen-vs-typmod errors inherited from pltcl.
2001-10-22 19:32:27 +00:00
Tom Lane b2e859a4fe Generate correct syntax for DROP OPERATOR with unary operators. 2001-10-22 19:31:09 +00:00
Michael Meskes e97fe98c36 synced preproc.y with gram.y 2001-10-22 17:05:56 +00:00
Tom Lane 6ec5eaad3b Fix FindExec() for case where executable is found via a relative path
in .:/home/postgres/testversion/bin:/opt/perl5.6.1/bin:/home/postgres/bin:/usr/local/bin:/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/pd/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/upgrade/bin:/opt/CC/bin:/opt/langtools/bin:/opt/graphics/phigs/bin:/opt/java/bin:/bin:/opt/imake/bin:/opt/hparray/bin:/opt/aCC/bin:/opt/lrom/bin:/usr/local/nmh/bin:. (I suppose the only common case for this is '.').
2001-10-21 03:43:54 +00:00
Tom Lane b2e92a712e Fix getopt-vs-init_ps_display problem by copying original argv[] info,
per suggestion from Peter.  Simplify several APIs by transmitting the
original argv location directly from main.c to ps_status.c, instead of
passing it down through several levels of subroutines.
2001-10-21 03:25:36 +00:00
Tom Lane 2b7206a993 Revert change to autodetect '__getopt_initialized' variable ... turns
out glibc doesn't actually export this variable, so we need a different
solution.
2001-10-20 17:57:39 +00:00
Bruce Momjian bb8f8e6279 Change LIMIT #,# error message to be more generic. 2001-10-20 16:51:02 +00:00
Bruce Momjian f363b3177d Remove LIMIT #,# and suggest LIMIT # OFFSET #, per mailing list discussion. 2001-10-20 02:55:39 +00:00
Thomas G. Lockhart 424d9389d6 Fix transposed arguments for typmod for one INTERVAL production.
Mask both typmod subfields for INTERVAL to avoid setting the high bit,
 per dire warning from Tom Lane.
Clear tmask for DTK_ISO_TIME case to avoid time zone troubles.
 Symptom reported by Tom Lane.
Clean up checking for valid time zone info in output routine.
 This should now work for both SQL99 and Unix-style time zones.
Put in explicit check for INTERVAL() typmod rounding to avoid accumulating
 cruft in the lower bits. Not sure that this helps, but we'll need to do
 something. The symptom is visible with a query like
 select interval(2) '10000 days 01:02:03.040506';
Regression tests are patched to repair the Tom Lane symptom, and all pass.
2001-10-20 01:02:22 +00:00
Tom Lane 3a484d9e99 Fix plperl to discard cached function definition after CREATE OR
REPLACE FUNCTION.  Clean up typlen/typmod errors inherited from pltcl.
2001-10-19 22:43:49 +00:00
Tom Lane 379268aa62 Proper fix for glibc getopt() botch. Surprising we did not see this
before.
2001-10-19 20:47:09 +00:00
Tom Lane 58f6b951c2 Fix a lot of confusion between typlen and typmod. Didn't hurt too much
back when only varlena types paid any attention to typmod ...
2001-10-19 19:43:19 +00:00
Tom Lane 861a679fc1 Set optreset on platforms that have it before launching postmaster
subprocesses; perhaps this will fix portability problem just noted by
Lockhart.  Also, move test for bad permissions of DataDir to a more
logical place.
2001-10-19 18:19:41 +00:00
Tom Lane 6430e6e283 Ensure that all startup paths (postmaster, standalone postgres, or
bootstrap) check for a valid PG_VERSION file before looking at anything
else in the data directory.  This fixes confusing error report when
trying to start current sources in a pre-7.1 data directory.
Per trouble report from Rich Shepard 10/18/01.
2001-10-19 17:03:08 +00:00
Tom Lane 3d510653a4 Rename macro arg to avoid useless compiler warning when building plperl. 2001-10-19 15:38:57 +00:00
Bruce Momjian ece1b67f54 > This stops the interface from leaking the row tuples (and thus the
> results of every fetch).

Stephen Robert Norris
2001-10-19 15:00:26 +00:00
Michael Meskes a535cd1f8b removed "not fully implemented" warning for nullif 2001-10-19 14:31:44 +00:00
Hiroshi Inoue 8c3cb43bac Change SC_fetch() to not retrieve data in case the
SQL_RETRIEVE_DATA option is SQL_RD_OFF. This would
avoid a crash when scrolling Grid controls.
2001-10-19 05:39:14 +00:00
Tom Lane abbc95e5c6 Fix pltcl to update cached function def after
CREATE OR REPLACE FUNCTION.
2001-10-19 02:43:46 +00:00
Tom Lane eb133197b6 Move init_ps_display from postgres.c to postmaster.c, putting it
just after receipt of the startup packet.  Now, postmaster children
that are waiting for client authentication response will show as
'postgres: user database host authentication'.  Also, do an
init_ps_display for startup/shutdown/checkpoint subprocesses,
so that they are readily identifiable as well.  Fix an obscure race
condition that could lead to Assert failure in the postmaster ---
attempting to start a checkpoint process before any connections have
been received led to calling PostmasterRandom before setting random_seed.
2001-10-19 00:44:08 +00:00
Tom Lane 9047292725 Spell 'between' correctly, clean up spacing in error messages. 2001-10-18 23:16:09 +00:00
Tom Lane 43568d11ad Fix memory leakage when sending notice messages to client. 2001-10-18 23:07:29 +00:00
Tom Lane aed378e8d1 Fix authentication so that it doesn't record an extra 'Password
authentication failed' and a 'send() failed: Broken pipe' message
on every connection from psql in password auth mode.  Problem is
that psql doesn't ask user for a password until it sees a password
challenge failure, and libpq just closes the connection unceremoniously
if it's challenged for a password when it hasn't got one to send.
Accordingly, EOF from the client after asking for a password is
normal behavior and should not result in postmaster log entries.
2001-10-18 22:44:37 +00:00
Tom Lane 13e467f74f Add STATUS_EOF value needed for auth.c. Remove a bunch of unused
STATUS_xxx macros to reduce clutter.
2001-10-18 22:40:52 +00:00
Tom Lane 4fec55af6c Fix several problems with simple_prompt() --- the nastiest being that
the entered password would get echoed on some platforms, eg HPUX.
We have enough copies of this code that I'm thinking it ought to be
moved into libpq, but that's a task for another day.
2001-10-18 21:57:11 +00:00
Bruce Momjian 278669e038 Document all the ecpg error codes. 2001-10-18 20:32:58 +00:00
Tom Lane b522ce0bcf Update for new expected results. 2001-10-18 20:10:31 +00:00
Tom Lane f9b6583747 Didn't compile on non-HAVE_TM_ZONE machines. 2001-10-18 19:54:59 +00:00
Tom Lane 369c9e3b6c Repair missing brace in HAVE_INT_TIMEZONE case. 2001-10-18 19:52:03 +00:00
Thomas G. Lockhart 9310075a13 Accept an INTERVAL argument for SET TIME ZONE per SQL99.
Modified the parser and the SET handlers to use full Node structures
 rather than simply a character string argument.
Implement INTERVAL() YEAR TO MONTH (etc) syntax per SQL99.
 Does not yet accept the goofy string format that goes along with, but
 this should be fairly straight forward to fix now as a bug or later
 as a feature.
Implement precision for the INTERVAL() type.
 Use the typmod mechanism for both of INTERVAL features.
Fix the INTERVAL syntax in the parser:
 opt_interval was in the wrong place.
INTERVAL is now a reserved word, otherwise we get reduce/reduce errors.
Implement an explicit date_part() function for TIMETZ.
 Should fix coersion problem with INTERVAL reported by Peter E.
Fix up some error messages for date/time types.
 Use all caps for type names within message.
Fix recently introduced side-effect bug disabling 'epoch' as a recognized
 field for date_part() etc. Reported by Peter E. (??)
Bump catalog version number.
Rename "microseconds" current transaction time field
 from ...Msec to ...Usec. Duh!
date/time regression tests updated for reference platform, but a few
 changes will be necessary for others.
2001-10-18 17:30:21 +00:00
Tom Lane 6254465d06 Extend code that deduces implied equality clauses to detect whether a
clause being added to a particular restriction-clause list is redundant
with those already in the list.  This avoids useless work at runtime,
and (perhaps more importantly) keeps the selectivity estimation routines
from generating too-small estimates of numbers of output rows.
Also some minor improvements in OPTIMIZER_DEBUG displays.
2001-10-18 16:11:42 +00:00
Michael Meskes 5045004958 Added Lee Kindness' patches. 2001-10-18 11:01:35 +00:00
Tom Lane b207081056 Make sure to clean out old activity string when recycling a backend entry. 2001-10-16 22:35:27 +00:00
Tom Lane 70e6003c76 Use LEFT JOIN, not FULL JOIN, in statistical views. 2001-10-16 20:51:35 +00:00
Barry Lind bf737b859f Updated the list of encodings supported to match what the backend now supports 2001-10-16 20:07:17 +00:00
Barry Lind f50793c743 Added some additional comments in the code 2001-10-16 20:05:22 +00:00
Bruce Momjian 076026bba9 Python handle as string all int8 values from postgresql. This could be
view when using the aggregate function count() and function nextval
that returns an int8 value, but in python is represented like string:

>> db.query("select nextval('my_seq')").getresult()
[('2',)]

>> db.query("select count(*) from films").dictresult()
[{'count': '120'}]



Ricardo Caesar Lenzi
2001-10-16 13:42:57 +00:00
Tatsuo Ishii cfe01796e6 Ok, here is the modified encoding table (column1 is the standard name,
2 is our "official" name, and 3 is alias). If there's no objection, I
will change them.

ASCII		SQL_ASCII
UTF-8		UNICODE		UTF_8
MULE-INTERNAL	MULE_INTERNAL
ISO-8859-1	LATIN1		ISO_8859_1
ISO-8859-2	LATIN2		ISO_8859_2
ISO-8859-3	LATIN3		ISO_8859_3
ISO-8859-4	LATIN4		ISO_8859_4
ISO-8859-5	ISO_8859_5
ISO-8859-6	ISO_8859_6
ISO-8859-7	ISO_8859_7
ISO-8859-8	ISO_8859_8
ISO-8859-9	LATIN5		ISO_8859_9
ISO-8859-10	LATIN6		ISO_8859_10
ISO-8859-13	LATIN7		ISO_8859_13
ISO-8859-14	LATIN8		ISO_8859_14
ISO-8859-15	LATIN9		ISO_8859_15
ISO-8859-16	LATIN10		ISO_8859_16
2001-10-16 10:09:17 +00:00
Tom Lane e158670c1f Doesn't anyone test stuff before they commit it? 2001-10-15 20:15:09 +00:00
Bruce Momjian 394925b60d > Uh, isn't the correct fix
> ! $$ = cat_str(8, make_str("grant"), $2, make_str("on"), $4, $5,
 > make_str("to"), $7, $8);
 > ISTM your patch loses the opt_with_grant clause.  (Of course the
 > backend doesn't currently accept that clause anyway, but that's no
 > reason for ecpg to drop it.)

My patch doesn't loose the option, it's never been passed on anyway:

 opt_with_grant:  WITH GRANT OPTION
                                {
                                        mmerror(ET_ERROR, "WITH GRANT OPTION is not supported.  Only relation owners can
 set privileges");
                                 }
                | /*EMPTY*/
                ;

The existing code in ecpg/preproc/preproc.y to handle the WITH option
simply throws an error and aborts the processing... The patch below
prevents the segfault and also passes on the WITH option to the
backend, probably a better fix.

Lee Kindness
2001-10-15 18:16:31 +00:00
Bruce Momjian 66b77dbcd6 Prompt for password from /dev/tty and fall back to stdin/stderr. 2001-10-15 16:40:27 +00:00
Tatsuo Ishii cdce507053 Forgot to add this file... 2001-10-15 04:52:59 +00:00
Bruce Momjian 1c6bd04713 PG_DUMP NLS (Russian)
Here is another one :)
Another chunk of translated messages.
Please apply to the same file.

Serguei Mokhov
2001-10-15 02:50:16 +00:00
Tatsuo Ishii df4cba68cf Commit Patrice's patches except:
> - corrects a bit the UTF-8 code from Tatsuo to allow Unicode 3.1
>  characters (characters with values >= 0x10000, which are encoded on
>  four bytes).

Also, update mb/expected/unicode.out. This is necessary since the
patches affetc the result of queries using UTF-8.
---------------------------------------------------------------
Hi,

I should have sent the patch earlier, but got delayed by other stuff.
Anyway, here is the patch:

- most of the functionality is only activated when MULTIBYTE is
  defined,

- check valid UTF-8 characters, client-side only yet, and only on
  output, you still can send invalid UTF-8 to the server (so, it's
  only partly compliant to Unicode 3.1, but that's better than
  nothing).

- formats with the correct number of columns (that's why I made it in
  the first place after all), but only for UNICODE. However, the code
  allows to plug-in routines for other encodings, as Tatsuo did for
  the other multibyte functions.

- corrects a bit the UTF-8 code from Tatsuo to allow Unicode 3.1
  characters (characters with values >= 0x10000, which are encoded on
  four bytes).

- doesn't depend on the locale capabilities of the glibc (useful for
  remote telnet).

I would like somebody to check it closely, as it is my first patch to
pgsql.  Also, I created dummy .orig files, so that the two files I
created are included, I hope that's the right way.

Now, a lot of functionality is NOT included here, but I will keep that
for 7.3 :) That includes all string checking on the server side (which
will have to be a bit more optimised ;) ), and the input checking on
the client side for UTF-8, though that should not be difficult. It's
just to send the strings through mbvalidate() before sending them to
the server. Strong checking on UTF-8 strings is mandatory to be
compliant with Unicode 3.1+ .

Do I have time to look for a patch to include iso-8859-15 for 7.2 ?
The euro is coming 1. january 2002 (before 7.3 !) and over 280
millions people in Europe will need the euro sign and only iso-8859-15
and iso-8859-16 have it (and unfortunately, I don't think all Unices
will switch to Unicode in the meantime)....

err... yes, I know that this is not every single person in Europe that
uses PostgreSql, so it's not exactly 280m, but it's just a matter of
time ! ;)

I'll come back (on pgsql-hackers) later to ask a few questions
regarding the full unicode support (normalisation, collation,
regexes,...) on the server side :)

Here is the patch !

Patrice.

--
Patrice HÉDÉ ------------------------------- patrice à islande org -----
  --  Isn't it weird  how scientists  can imagine  all the matter of the
universe exploding out of a dot smaller than the head of a pin, but they
can't come up with a more evocative name for it than "The Big Bang" ?
  -- What would _you_ call the creation of the universe ?
  -- "The HORRENDOUS SPACE KABLOOIE !"               - Calvin and Hobbes
------------------------------------------ http://www.islande.org/ -----
2001-10-15 01:25:10 +00:00
Tatsuo Ishii d07bacd54a Add UTF-8 char >= 0x10000 check 2001-10-15 01:19:15 +00:00
Tom Lane e3b3eb20a4 Synchronize with main parser's keyword list (someone didn't check his
last commit very carefully...)
2001-10-15 00:06:04 +00:00
Michael Meskes 1ebc028cbc - Fixed GRANT statement.
- Synced preproc.y with gram.y.
2001-10-14 12:07:57 +00:00
Tom Lane e482dcb0a4 Make selectivity routines cope gracefully with NaNs, infinities, and
NUMERIC values that are out of the range of 'double'.  Per trouble
report from Mike Quinn.
2001-10-13 23:32:34 +00:00
Peter Eisentraut d1c6983899 Fix logic in insert() function. 2001-10-13 19:16:32 +00:00
Tom Lane 9ca41c0413 Fixing closed-path intersection logic causes this test to find more
streets than it used to...
2001-10-13 17:41:11 +00:00
Tom Lane cf5dc330b9 path_inter, path_distance, path_length, dist_ppath now do the right
things with closed paths --- ie, include the closing line segment in
their calculations.  Per bug report from Curtis Barrett 9-Oct-01.
2001-10-13 17:40:24 +00:00
Tom Lane 58dc94abac Add missing prototype to suppress gcc warning. 2001-10-13 16:34:08 +00:00
Tom Lane f42b88d1b4 Residual cleanup from making pltcl unknown support always enabled. 2001-10-13 15:24:23 +00:00
Bruce Momjian 8123d8f150 Here are few more translated messages into Russian
for the PG_DUMP component.

Please apply to </src/bin/pg_dump/ru.po>

Serguei A. Mokhov
2001-10-13 04:25:27 +00:00
Bruce Momjian 1d3a47af0c Attached patch for unconditional enabling of pltcl-unknown support.
Enabling this feature adds very light overhead of 1 select from pg_class on
first using of pl/tcl in backend if unknown suppport is really unused.
But pl/tcl with this support has very improved functionality.

Patch includes changes to documentation.
2001-10-13 04:23:50 +00:00
Bruce Momjian dac9f40ba8 Mention createlang when language not installed, per problem report. 2001-10-13 01:35:25 +00:00
Hiroshi Inoue 0420342af1 Update the version of psqlodbc driver. 2001-10-12 09:41:49 +00:00
Tatsuo Ishii f426465ba9 Add a new function "pg_client_encoding" which returns the current client
side encoding name. This is necessary for client API's such as JDBC
to perform correct encoding conversions. See my email "[HACKERS]
pg_client_encoding" 10 Sep 2001.
2001-10-12 02:08:34 +00:00
Hiroshi Inoue 9d13fcf0af Fix the bug reported by Chris Lee. 2001-10-12 01:08:51 +00:00
Tom Lane f9e6e27c87 Break transformCreateStmt() into multiple routines and make
transformAlterStmt() use these routines, instead of having lots of
duplicate (not to mention should-have-been-duplicate) code.
Adding a column with a CHECK constraint actually works now,
and the tests to reject unsupported DEFAULT and NOT NULL clauses
actually fire now.  ALTER TABLE ADD PRIMARY KEY works, modulo
having to have created the column(s) NOT NULL already.
2001-10-12 00:07:15 +00:00
Tom Lane 97d0c8b219 Suppress gcc warnings. 2001-10-11 18:06:52 +00:00
Bruce Momjian 78f7ba13cb Tatsuo Ishii <t-ishii@sra.co.jp> writes:
> As you can see, psql reconnect as any user if the password is same as
> foo. Of course this is due to the careless password setting, but I
> think it's better to prompt ANY TIME the user tries to switch to
> another user. Comments?

Yeah, I agree.  Looks like a simple change in dbconnect():

    /*
     * Use old password if no new one given (if you didn't have an old
     * one, fine)
     */
    if (!pwparam && oldconn)
        pwparam = PQpass(oldconn);

to

    /*
     * Use old password (if any) if no new one given and we are
     * reconnecting as same user
     */
    if (!pwparam && oldconn && PQuser(oldconn) && userparam &&
        strcmp(PQuser(oldconn), userparam) == 0)
        pwparam = PQpass(oldconn);

                        regards, tom lane
2001-10-11 16:54:18 +00:00
Tatsuo Ishii 51053d3216 Add support for ISO-8859-6 to 16 2001-10-11 14:20:35 +00:00
Peter Eisentraut 371f49bf9f Remove gratuitous discrepancy between extract() and date_part(),
regarding timezone_hour, timezone_minute vs. tz_hour, tz_minute.
Document the former.
2001-10-10 00:02:42 +00:00
Peter Eisentraut ec5c62874d Allow optional () after current_user, session_user, user, current_time,
current_timestamp, current_date for ODBC compatibility.

Add more functions to odbc.sql catalog extension, use new CREATE OR
REPLACE FUNCTION.

Document iODBC/unixODBC build options.
2001-10-09 22:32:33 +00:00
Barry Lind 839b9bc011 This patch fixes a bug introduced in the jdbc bytea support patch.
That patch broke the ability to read data from binary cursors.
--Barry Lind
 Modified Files:
 	pgsql/src/interfaces/jdbc/org/postgresql/Connection.java
 	pgsql/src/interfaces/jdbc/org/postgresql/ResultSet.java
 	pgsql/src/interfaces/jdbc/org/postgresql/core/QueryExecutor.java
 	pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/Connection.java
 	pgsql/src/interfaces/jdbc/org/postgresql/jdbc1/ResultSet.java
 	pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/Connection.java
 	pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
 	pgsql/src/interfaces/jdbc/org/postgresql/jdbc2/UpdateableResultSet.java
2001-10-09 20:47:35 +00:00
Tom Lane 2f1c24cb1c Change plpgsql compiler so that all elogs are trapped and a suitable
NOTICE added about error location (same method already used by plpgsql
executor).  Add checking of pg_proc row xmin/cmin to ensure that
plpgsql functions will be recompiled after they've been modified by
CREATE OR REPLACE FUNCTION.
2001-10-09 15:59:56 +00:00
Tom Lane c781600618 Fix typo in error message. Noted by laser@zhengmai.com.cn. 2001-10-09 14:00:22 +00:00
Tom Lane 0b3bca6c6f Change plpgsql to depend on main parser's type-declaration grammar,
rather than having its own somewhat half-baked notion of what a type
declaration looks like.  This is necessary now to ensure that plpgsql
will think a 'timestamp' variable has the same semantics as 'timestamp'
does in the main SQL grammar; and it should avoid divergences in future.
2001-10-09 04:15:38 +00:00
Tom Lane 7ecc40c2df Another go-round with FigureColname, to produce less surprising results
for nested typecasts.  It now produces a column header of 'timestamptz'
for 'SELECT CURRENT_TIMESTAMP', rather than 'text' as it was doing for
awhile there.
2001-10-08 21:48:51 +00:00
Tom Lane 71f2993c45 Fix transformExpr() to not scribble on its input datastructure while
transforming CASE expressions.  This was definitely confusing
FigureColname, and might lead to bad things elsewhere as well.
2001-10-08 21:46:59 +00:00
Tom Lane 1c7bef32b4 Fix ruleutils to depend on format_type, rather than having a private
copy of code that knows about displaying types with typmod info.
Needed so that it does the right thing with timestamp datatypes now.
2001-10-08 19:55:07 +00:00
Tom Lane b6a7948294 Make ALTER TABLE RENAME COLUMN update column names of indexes that
refer to the renamed column.  Brent Verner, with a little help from tgl.
2001-10-08 18:40:04 +00:00
Tom Lane 7249562fe3 Remove redundant code, update comments, cause CURRENT_TIME to
agree with CURRENT_TIME(n).
2001-10-08 18:16:59 +00:00