Commit Graph

26 Commits

Author SHA1 Message Date
Bruce Momjian 96e1fbe396 I recently received the Debian bug report below about missing iconv
support for the dbf2pg contrib module.

The submitter created a patch which replaces the silent ignoring of -F
(when iconv support is disabled) with a meaningful warning.

Martin Pitt
2005-12-08 18:04:33 +00:00
Bruce Momjian 1dc3498251 Standard pgindent run for 8.1. 2005-10-15 02:49:52 +00:00
Tom Lane dd0fa0f958 Minor dbf2pg fixes from Martin Pitt: check for failure when issuing
CREATE TABLE command, and translate dBase's 'M' field type to 'text'.
2005-10-06 23:05:22 +00:00
Tom Lane 8a65b820e2 Suppress signed-vs-unsigned-char warnings in contrib. 2005-09-24 19:14:05 +00:00
Tom Lane b4176e9f4c Clean up bogus checking of date and numeric fields in DBF files,
per report from Boris van Schooten.
2005-05-27 15:44:04 +00:00
Tom Lane fc564686a7 Fix contrib/dbase to compile under Win32. Laurent Ballester 2004-09-14 03:28:28 +00:00
Bruce Momjian b6b71b85bc Pgindent run for 8.0. 2004-08-29 05:07:03 +00:00
Bruce Momjian 44f8c5c10a Make dbf2pg safe for non-ASCII character sets.
M?rcio Dick Smiderle
2003-09-27 22:24:49 +00:00
Bruce Momjian 3b2440ebec Remove simple_prompt from /contrib C files, now that it is in /port.
They had the old versions anyway.
2003-08-08 20:20:49 +00:00
Bruce Momjian 089003fb46 pgindent run. 2003-08-04 00:43:34 +00:00
Bruce Momjian 82bade79dc dbf2pg - Insert xBase-style .dbf-files into a PostgreSQL-table
There is an option "-s oldname=newname", which changes the old field name of
  the dbf-file to the newname in PostgeSQL. If the length of the new name is 0,
  the field is skiped. If you want to skip the first field of the dbf-file,
  you get the wildest error-messages from the backend.
  dbf2pg load the dbf-file via "COPY tablename FROM STDIN". If you skip the
  first field, it is an \t to much in STDIN.

A fix could be an counter j=0, which increments only, if a field is imported
(IF (strlen(fields[h].db_name)> 0) j++. And only if j > 1 (if an other field is
imported) the \t is printed.

An other small bug in the README:
-s start
              Specify  the  first record-number in the xBase-file
              we will insert.
should be
-e start
              Specify  the  first record-number in the xBase-file
              we will insert.

Thomas Behr
2003-07-31 02:12:43 +00:00
Tom Lane f85f43dfb5 Backend support for autocommit removed, per recent discussions. The
only remnant of this failed experiment is that the server will take
SET AUTOCOMMIT TO ON.  Still TODO: provide some client-side autocommit
logic in libpq.
2003-05-14 03:26:03 +00:00
Tom Lane e4704001ea This patch fixes a bunch of spelling mistakes in comments throughout the
PostgreSQL source code.

Neil Conway
2003-03-10 22:28:22 +00:00
Tom Lane 5936055d46 Avoid use of inline functions that are not declared static. Needed to
conform to C99's brain-dead notion of how inline functions should work.
2002-10-31 19:11:48 +00:00
Bruce Momjian aa4c702eac Update /contrib for "autocommit TO 'on'".
Create objects in public schema.

Make spacing/capitalization consistent.

Remove transaction block use for object creation.

Remove unneeded function GRANTs.
2002-10-18 18:41:22 +00:00
Bruce Momjian e50f52a074 pgindent run. 2002-09-04 20:31:48 +00:00
Bruce Momjian 66eb8df6a4 The attached patch changes most of the usages of sprintf() to
snprintf() in contrib/. I didn't touch the places where pointer
arithmatic was being used, or other areas where the fix wasn't
trivial. I would think that few, if any, of the usages of sprintf()
were actually exploitable, but it's probably better to be paranoid...

Neil Conway
2002-08-15 02:58:29 +00:00
Tom Lane 92a2598f97 The result of getopt() should be compared to -1, not EOF, per
pgsql-hackers discussion of this date.
2002-01-10 01:11:45 +00:00
Bruce Momjian 6b086de31a Update dbase for Maarten.Boekhold. 2001-12-31 13:32:04 +00:00
Tom Lane ee051baeac Make sure that all <ctype.h> routines are called with unsigned char
values; it's not portable to call them with signed chars.  I recall doing
this for the last release, but a few more uncasted calls have snuck in.
2001-12-30 23:09:42 +00:00
Bruce Momjian 491545fff4 Do not require iconv for dbase conversion. 2001-12-21 05:29:46 +00:00
Bruce Momjian 3f94ff5400 Allow contrib/dbase to compile if HAVE_ICONV_H it not defined. This is
only a partial solution but a step in the right direction.
2001-12-21 04:30:59 +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
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
Tom Lane 1e2779117d Fix some portability problems (get it to compile, at least, on HP's cc) 2001-10-15 18:49:40 +00:00
Bruce Momjian c2a062b7fe Add dbase conversion utility to /contrib. 2001-05-10 14:41:23 +00:00