1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00
Commit Graph

2113 Commits

Author SHA1 Message Date
089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
63354a0228 Remove extra paren in NOT_USED code, found by pgindent. 2003-08-04 00:26:49 +00:00
57c08791d1 Code review for sslmode patch: eliminate memory leak, avoid giving a
completely useless error message in 'allow' case, don't retry connection
at the sendauth stage (by then the server will either let us in or not,
no point in wasting cycles on another try in the other SSL state).
2003-08-01 21:27:27 +00:00
25b10fc1e6 Missed two places to replace union member. 2003-08-01 18:19:03 +00:00
6520c666c1 Fix a few of the more blatantly unportable constructs in this file. 2003-08-01 18:10:43 +00:00
3a1ed8761f Fix inconsistent static-vs-not-static declarations. 2003-08-01 18:03:57 +00:00
38a412ec39 Fix compile warning. 2003-08-01 16:46:06 +00:00
ec506c12cd Russian translation updates by Serguei Mokhov 2003-08-01 16:19:14 +00:00
7843a44839 Use only two-part shared library version numbers, for better portability
and consistency.
2003-08-01 16:18:04 +00:00
4f7df90db0 Make ecpg SQLSTATE-aware. Map existing SQLCODE assignments to SQLSTATEs,
rather than parsing the message.  Add some documentation about embedded
SQL.
2003-08-01 13:53:36 +00:00
0584370728 Added missing TO keyword. 2003-08-01 11:25:55 +00:00
7a9c074cba - Added some Informix error codes in Informix mode.
- Added just another pgtypeslib function.
2003-08-01 08:21:04 +00:00
4895635da4 clean python out of Makefile 2003-08-01 04:24:57 +00:00
13a0e910cd remove python module, as its moved to http://www.pygresql.org 2003-08-01 04:19:06 +00:00
81b5c8a136 A visit from the message-style police ... 2003-07-28 00:09:16 +00:00
9df48371c2 here are the patches for psql on Win32:
psql4win32.patch  - changes in the psql source code
  psql-ref.patch    - changes in the documentation psql-ref.sgml
                      (for new builtin variable WIN32_CONSOLE)

To apply them use "patch -p 1" in the root directory of the
postgres source directory.

These patches fix the following problems of psql on Win32
(all changes only have effect #ifdef WIN32):

  a) Problem:  Static library libpq.a did not work
     Solution: Added WSAStartup() in fe-connect.c

  b) Problem:  Secret Password was echoed by psql
     Solution: Password echoing disabled in sprompt.c

  c) Problem:  8bit characters were displayed/interpreted wrong in psql
               This is due to the fact that the Win32 "console" uses a
               different encoding than the rest of the Windows system
     Solution: Introduced a new psql variable WIN32_CONSOLE
               When set with "\set WIN32_console", the function OemToChar()
               is applied after reading input and CharToOem() before
               displaying Output

Christoph Dalitz
2003-07-27 03:32:26 +00:00
397831e103 At long last I put together a patch to support 4 client SSL negotiation
modes (and replace the requiressl boolean). The four options were first
spelled out by Magnus Hagander <mha@sollentuna.net> on 2000-08-23 in email
to pgsql-hackers, archived here:

http://archives.postgresql.org/pgsql-hackers/2000-08/msg00639.php

My original less-flexible patch and the ensuing thread are archived at:

http://dbforums.com/t623845.html

Attached is a new patch, including documentation.

To sum up, there's a new client parameter "sslmode" and environment
variable "PGSSLMODE", with these options:

sslmode   description
-------   -----------
disable   Unencrypted non-SSL only
allow     Negotiate, prefer non-SSL
prefer    Negotiate, prefer SSL (default)
require   Require SSL

The only change to the server is a new pg_hba.conf line type,
"hostnossl", for specifying connections that are not allowed to use SSL
(for example, to prevent servers on a local network from accidentally
using SSL and wasting cycles). Thus the 3 pg_hba.conf line types are:

pg_hba.conf line types
----------------------
host       applies to either SSL or regular connections
hostssl    applies only to SSL connections
hostnossl  applies only to regular connections

These client and server options, the postgresql.conf ssl = false option,
and finally the possibility of compiling with no SSL support at all,
make quite a range of combinations to test. I threw together a test
script to try many of them out. It's in a separate tarball with its
config files, a patch to psql so it'll announce SSL connections even in
absence of a tty, and the test output. The test is especially informative
when run on the same tty the postmaster was started on, so the FATAL:
errors during negotiation are interleaved with the psql client output.

I saw Tom write that new submissions for 7.4 have to be in before midnight
local time, and since I'm on the east coast in the US, this just makes it
in before the bell. :)

Jon Jensen
2003-07-26 13:50:02 +00:00
6a0d6d0060 Added explicit casts for date/interval/timestamp. 2003-07-25 16:10:26 +00:00
4c4a667f4d Applied Peter's patch to use yyless instead of my string_unput function. 2003-07-25 05:42:27 +00:00
060229b9d7 Fixed mdy functions to use correct offset. 2003-07-24 08:41:07 +00:00
a7a012d167 Fixes additional sql injection vulnerabilities reported by Oliver Jowett
and Dmitry Tkach.  Specifically the previous fix still allowed the statement termination character through in unquoted places in the sql statement, and the driver never correctly handled someone passing a value of \0 in a string which under the v2 protocol would end the statement causing the following text to possibly
be treated as a new sql statement
 Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-07-24 00:30:39 +00:00
df63503dc2 Have a go at fixing various outstanding portability issues in code that
was modified for IPv6.  Use a robust definition of struct sockaddr_storage,
do a proper configure test to see if ss_len exists, don't assume that
getnameinfo() will handle AF_UNIX sockets, don't trust getaddrinfo to
return the protocol we ask for, etc.  This incorporates several outstanding
patches from Kurt Roeckx, but I'm to blame for anything that doesn't
work ...
2003-07-23 23:30:41 +00:00
56b8a6f5d1 Czech translation updates from Karel Zak 2003-07-23 09:36:43 +00:00
0a73f69cb4 Fix to prevent SQL injection attacks for code calling setObject(int,Object,int)
where Object is a user supplied String and the type is a numeric type
(i.e. INTEGER,LONG,etc).
Also applied a patch from Kim Ho that fixes compile problems under jdk1.2

 Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-07-22 05:17:09 +00:00
80bbd3281d Applied patch from dmitry@openratings.com to fix parsing of array values
Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/jdbc2/Array.java
2003-07-21 20:48:31 +00:00
45d8f61ff2 Added more compat stuff ot the parser. 2003-07-18 14:32:56 +00:00
157e17e20d Add an upper limit to IS_VALID_JULIAN() to defend against overflow in
date2j().  This ensures we give reasonable errors instead of bizarre
behavior for input dates far in the future.
2003-07-17 22:28:42 +00:00
c15b66ef82 Allow blanks at the end of numerical values. 2003-07-17 11:27:55 +00:00
7d32551a81 Fixed some bugs in Informix compat functions. 2003-07-17 07:54:29 +00:00
764f72dc82 Make EXTRACT(TIMEZONE) and SET/SHOW TIMEZONE follow the SQL convention
for the sign of timezone offsets, ie, positive is east from UTC.  These
were previously out of step with other operations that accept or show
timezones, such as I/O of timestamptz values.
2003-07-17 00:55:37 +00:00
96be4b28a3 Applied patch to fix two compatibility functions. 2003-07-16 13:18:51 +00:00
42df5e311f Started to create different error codes for different backend messages. 2003-07-15 12:38:38 +00:00
6eb27d16b6 Missed one rule in syncinc preproc.y which resulted in reduce/reduce conflicts. 2003-07-14 12:18:25 +00:00
e895eb197d - Synced preproc.y with gram.y
- Init sqlca in ECPGprepare().
        - Added CLOSE DATABASE for Informix compatibility.
2003-07-14 10:16:45 +00:00
18936ef372 Argh! Missed one file. 2003-07-09 14:53:18 +00:00
abfa8ae54f Fixed some Informix compat functions so they handle NULL resp. indicators better. 2003-07-09 13:49:38 +00:00
6896bfa86c Applied patch from Kim Ho @ redhat.com to make support for setObject() more
spec complient with regards to various data/time/timestamp objects

 Modified Files:
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
2003-07-09 05:12:04 +00:00
f207718b0c More informix fixes. 2003-07-08 12:11:35 +00:00
fee6fd7f65 Fix segfault in connect in informix mode. 2003-07-08 07:13:48 +00:00
91d60637cf "char *" of course is not the same as "char []". So I had to fix the way ecpg treated the second one. 2003-07-07 12:15:33 +00:00
841b4a2d55 tm2timestamp should return -1, not elog, on overflow. (In the backend
this is merely an API inconsistency, but in ecpg it's fatal.)  Also,
fix misconceived overflow test in HAVE_INT64_TIMESTAMP case.
2003-07-04 18:21:14 +00:00
3abbce39d5 Fix missing code for HAVE_INT64_TIMESTAMP. 2003-07-04 18:15:10 +00:00
efbbd107c7 Add #include <limits.h> (re-add lost change from Wednesday). 2003-07-04 16:28:03 +00:00
c7fddd3072 date, interval and timestamp data should be quoted. 2003-07-04 12:00:52 +00:00
23e4fc18a7 Fixed informix behaviour for select without into. 2003-07-04 11:30:48 +00:00
7b1885bf98 Fixed initialization bug and added postgres_fe.h to pgtypeslib. 2003-07-02 07:57:36 +00:00
cc3002313f Fix ecpg typo --- change ;; to ;. 2003-07-01 19:58:23 +00:00
2bdd2e5dcf Use ISO dates in pgtypeslib by default.
Applied patch by Philip Yarra to fix some thread issues.
Added a new data type "decimal" which is mostly the same as our
	"numeric" but uses a fixed length array to store the digits. This is
	for compatibility with Informix and maybe others.
2003-07-01 12:40:52 +00:00
df08f5c003 patches by Kim Ho to fix
getByte, getSort if input has decimal or whitespace
setObject if object is a BIT
boolean not on list of SQLKeywords
2003-06-30 21:10:55 +00:00
9af05a9d10 Patches applied:
1) Patch from Kris Jurka to fix IPv6 parsing of the jdbc URL
	2) Patch from Kris Jurka to fix an ArrayIndexOutOfBounds error
	   when calling moveToCurrentRow while currentRow is "beforeFirst"
	3) Patch from Kim Ho to fix add some bounds checking in setMaxRows(),
	   setQueryTimeout(), setFetchSize()

 Modified Files:
 	jdbc/org/postgresql/Driver.java.in
 	jdbc/org/postgresql/errors.properties
 	jdbc/org/postgresql/jdbc1/AbstractJdbc1Statement.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2ResultSet.java
 	jdbc/org/postgresql/jdbc2/AbstractJdbc2Statement.java
2003-06-30 16:38:30 +00:00