summaryrefslogtreecommitdiff
path: root/src/bin/psql/copy.c
AgeCommit message (Collapse)Author
2004-04-19* Most changes are to fix warnings issued when compiling win32Bruce Momjian
* removed a few redundant defines * get_user_name safe under win32 * rationalized pipe read EOF for win32 (UPDATED PATCH USED) * changed all backend instances of sleep() to pg_usleep - except for the SLEEP_ON_ASSERT in assert.c, as it would exceed a 32-bit long [Note to patcher: If a SLEEP_ON_ASSERT of 2000 seconds is acceptable, please replace with pg_usleep(2000000000L)] I added a comment to that part of the code: /* * It would be nice to use pg_usleep() here, but only does 2000 sec * or 33 minutes, which seems too short. */ sleep(1000000); Claudio Natoli
2004-04-19Complete TODO item:Bruce Momjian
o -Allow dump/load of CSV format This adds new keywords to COPY and \copy: CSV - enable CSV mode (comma separated variable) QUOTE - specify quote character ESCAPE - specify escape character FORCE - force quoting of specified column LITERAL - suppress null comparison for columns Doc changes included. Regression updates coming from Andrew.
2004-04-12Change psql \copy stdin/stdout to read from command input/output.Bruce Momjian
Add pstdin/pstdout to read from psql's stdin/stdout. BACKWARD INCOMPATIBLE CHANGE
2004-01-29Fix (debatable) spelling mistake in a comment: 'concatenate' is the usualNeil Conway
term, not 'catenate'.
2004-01-28Make USING and WITH optional to bring the syntax of \copy into exactTom Lane
agreement with what the backend grammar actually accepts (which is a bit looser than what its documentation claims). Per report from Bill Moran, though I did not use his patch since it removed all the undocumented flexibility that the code historically had and the backend still has.
2004-01-26Ensure that close() and fclose() are checked for errors, at least inTom Lane
cases involving writes. Per recent discussion about the possibility of close-time failures on some filesystems. There is a TODO item for this, too.
2004-01-25More fallout from the recent psql patch: rename xmalloc and friends toNeil Conway
pg_malloc, to avoid linker failures on same platforms.
2004-01-24This patch makes some of the memory manipulation performed by psql aNeil Conway
little more sane. Some parts of the code was using a static function xmalloc() that did safe memory allocation (where "safe" means "bail out on OOM"), but most of it was just invoking calloc() or malloc() directly. Now almost everything invokes xmalloc() or xcalloc().
2004-01-20Implement '\copy from -' to support reading copy data from the sameTom Lane
source the \copy came from. Also, fix prompting logic so that initial and per-line prompts appear for all cases of reading from an interactive terminal. Patch by Mark Feit, with some kibitzing by Tom Lane.
2004-01-09Allow psql to handle tilde user expansion for file names.Bruce Momjian
Zach Irmen
2003-12-01This patch reduces some unsightly #ifdefs, and fixes two typos inBruce Momjian
comments in the psql code. This doesn't make any functional change, so feel free to save it for 7.5 Neil Conway
2003-11-29$Header: -> $PostgreSQL Changes ...PostgreSQL Daemon
2003-08-04Fix some copyright notices that weren't updated. Improve copyright toolTom Lane
so it won't miss 'em again.
2003-08-04pgindent run.Bruce Momjian
2003-07-23Apply message style guide to frontend programs.Peter Eisentraut
2003-06-28Update psql for some features of new FE/BE protocol. There is aTom Lane
client-side AUTOCOMMIT mode now: '\set AUTOCOMMIT off' supports SQL-spec commit behavior. Get rid of LO_TRANSACTION hack --- the LO operations just work now, using libpq's ability to track the transaction status. Add a VERBOSE variable to control verboseness of error message display, and add a %T prompt-string code to show current transaction-block status. Superuser state display in the prompt string correctly follows SET SESSION AUTHORIZATION commands. Control-C works to get out of COPY IN state.
2003-03-20Here's some changes I made last night to psql's common.c (as found inBruce Momjian
7.3.2). It removes some code duplication and #ifdeffing, and some unstructured ugliness such as tacky breaks and an unneeded continue. Breaks up a large function into smaller functions and reduces required nesting levels, and kills a variable or two. Jeroen T. Vermeulen
2002-10-19Fix psql's \copy to accept table names containing schemas, as well asTom Lane
a column list. Bring its parsing of quoted names and quoted strings somewhat up to speed --- I believe it now handles all non-error cases the same way the backend would, but weird boundary conditions are not necessarily done the same way.
2002-10-15Fix psql to cope with autocommit off, at least during startup.Tom Lane
Behavior of backslash commands (especially for large objects) may still require some thought.
2002-10-03The attached patch fixes a number of issues related to compiling theBruce Momjian
client utilities (libpq.dll and psql.exe) for win32 (missing defines, adjustments to includes, pedantic casting, non-existent functions) per: http://developer.postgresql.org/docs/postgres/install-win32.html. It compiles cleanly under Windows 2000 using Visual Studio .net. Also compiles clean and passes all regression tests (regular and contrib) under Linux. In addition to a review by the usual suspects, it would be very desirable for someone well versed in the peculiarities of win32 to take a look. Joe Conway
2002-09-22Translation updates, some messages tweaked.Peter Eisentraut
2002-09-04pgindent run.Bruce Momjian
2002-06-20Improve COPY syntax to use WITH clause, keep backward compatibility.Bruce Momjian
2002-04-24Remove reference to BLCKSZ.Peter Eisentraut
2002-04-24Remove traces of NAMEDATALEN and INDEX_MAX_KEYS from psql. Build buffersPeter Eisentraut
dynamically with PQExpBuffer.
2002-02-23Add fstat / S_ISDIR checks to make sure we're not trying to use aBruce Momjian
directory for COPY TO/FROM. Brent Verner
2001-06-02Native Language Support (NLS)Peter Eisentraut
Use --enable-nls to turn it on; see installation instructions for details. See developer's guide how to make use of it in programs and how to add translations. psql sources have been almost fully prepared and an incomplete German translation has been provided. In the backend, only elog() calls are currently translatable, and the provided German translation file is more of a placeholder.
2001-03-22pgindent run. Make it all clean.Bruce Momjian
2001-02-10Restructure the key include files per recent pghackers discussion: thereTom Lane
are now separate files "postgres.h" and "postgres_fe.h", which are meant to be the primary include files for backend .c files and frontend .c files respectively. By default, only include files meant for frontend use are installed into the installation include directory. There is a new make target 'make install-all-headers' that adds the whole content of the src/include tree to the installed fileset, for use by people who want to develop server-side code without keeping the complete source tree on hand. Cleaned up a whole lot of crufty and inconsistent header inclusions.
2000-12-03Fix counting of lines in scripts with 'copy from stdin'.Peter Eisentraut
2000-04-16more psql bug squashing:Peter Eisentraut
\copy without arguments failed commands with too many arguments were too silent
2000-04-14fixed another psql \e bug (handle newlines as whitespace)Peter Eisentraut
repaired psql option scanning bug (special treatment to \g |pipe) fixed ipcclean makefile made configure look for Perl to handle psql help build gracefully
2000-04-12Ye-old pgindent run. Same 4-space tabs.Bruce Momjian
2000-03-01More fixes for psql ^C handling, especially during copy. Still doesn'tPeter Eisentraut
cope so well with copy to but that will have to wait for the next release. Also added -X option to prevent reading .psqlrc startup file.
2000-02-21Fixed psql's Control-C handling when COPY in progressPeter Eisentraut
2000-02-16Clean up include files use in psql.Bruce Momjian
2000-01-29A few minor psql enhancementsPeter Eisentraut
Initdb help correction Changed end/abort to commit/rollback and changed related notices Commented out way old printing functions in libpq Fixed a typo in alter table / alter column
2000-01-21Fix handleCopyIn's response to EOF seen mid-line, that is, input fileTom Lane
does not end with a newline. I don't think this explains the recent complaints, since this bug existed in 6.5 (and probably long before). But might as well fix it now that I see it.
2000-01-20Added new pg_id to fix initdb problemsPeter Eisentraut
New INSTALL file Fixed a copyright notice
2000-01-18another set of cleanupsPeter Eisentraut
2000-01-15Adapt to the changes of libpq(eliminateing using putenv()).Tatsuo Ishii
2000-01-14Fixed psql variables vs array syntax, as well as minor psql enhancementsPeter Eisentraut
2000-01-12Fixed a few "fixes" and bugs. Adjusted messages and options to GNU suggestions.Peter Eisentraut
1999-11-04psql cleanupBruce Momjian
1999-11-04Major psql overhaul by Peter Eisentraut.Bruce Momjian