summaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/ascii.c
Commit message (Collapse)AuthorAgeFilesLines
* Phase 2 pgindent run for v12.Tom Lane2019-05-221-1/+1
| | | | | | | | | Switch to 2.1 version of pg_bsd_indent. This formats multiline function declarations "correctly", that is with additional lines of parameter declarations indented to match where the first line's left parenthesis is. Discussion: https://postgr.es/m/CAEepm=0P3FeTXRcU5B2W3jv3PgRVZ-kGUXLGfd42FFhUROO3ug@mail.gmail.com
* Update copyright for 2019Bruce Momjian2019-01-021-1/+1
| | | | Backpatch-through: certain files through 9.4
* Update copyright for 2018Bruce Momjian2018-01-021-1/+1
| | | | Backpatch-through: certain files through 9.3
* Phase 2 of pgindent updates.Tom Lane2017-06-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change pg_bsd_indent to follow upstream rules for placement of comments to the right of code, and remove pgindent hack that caused comments following #endif to not obey the general rule. Commit e3860ffa4dd0dad0dd9eea4be9cc1412373a8c89 wasn't actually using the published version of pg_bsd_indent, but a hacked-up version that tried to minimize the amount of movement of comments to the right of code. The situation of interest is where such a comment has to be moved to the right of its default placement at column 33 because there's code there. BSD indent has always moved right in units of tab stops in such cases --- but in the previous incarnation, indent was working in 8-space tab stops, while now it knows we use 4-space tabs. So the net result is that in about half the cases, such comments are placed one tab stop left of before. This is better all around: it leaves more room on the line for comment text, and it means that in such cases the comment uniformly starts at the next 4-space tab stop after the code, rather than sometimes one and sometimes two tabs after. Also, ensure that comments following #endif are indented the same as comments following other preprocessor commands such as #else. That inconsistency turns out to have been self-inflicted damage from a poorly-thought-through post-indent "fixup" in pgindent. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/E1dAmxK-0006EE-1r@gemulon.postgresql.org Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
* Generate fmgr prototypes automaticallyPeter Eisentraut2017-01-171-0/+1
| | | | | | | | | | | | Gen_fmgrtab.pl creates a new file fmgrprotos.h, which contains prototypes for all functions registered in pg_proc.h. This avoids having to manually maintain these prototypes across a random variety of header files. It also automatically enforces a correct function signature, and since there are warnings about missing prototypes, it will detect functions that are defined but not registered in pg_proc.h (or otherwise used). Reviewed-by: Pavel Stehule <pavel.stehule@gmail.com>
* Update copyright via script for 2017Bruce Momjian2017-01-031-1/+1
|
* Update copyright for 2016Bruce Momjian2016-01-021-1/+1
| | | | Backpatch certain files through 9.1
* Update copyright for 2015Bruce Momjian2015-01-061-1/+1
| | | | Backpatch certain files through 9.0
* Update copyright for 2014Bruce Momjian2014-01-071-1/+1
| | | | | Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
* Update copyrights for 2013Bruce Momjian2013-01-011-1/+1
| | | | | Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
* Update copyright notices for year 2012.Bruce Momjian2012-01-011-1/+1
|
* Code review for pgstat_get_crashed_backend_activity patch.Tom Lane2011-10-211-13/+16
| | | | | | | Avoid possibly dumping core when pgstat_track_activity_query_size has a less-than-default value; avoid uselessly searching for the query string of a successfully-exited backend; don't bother putting out an ERRDETAIL if we don't have a query to show; some other minor stylistic improvements.
* Try to log current the query string when a backend crashes.Robert Haas2011-10-211-0/+34
| | | | | | | | | | | | | | | | To avoid minimize risk inside the postmaster, we subject this feature to a number of significant limitations. We very much wish to avoid doing any complex processing inside the postmaster, due to the posssibility that the crashed backend has completely corrupted shared memory. To that end, no encoding conversion is done; instead, we just replace anything that doesn't look like an ASCII character with a question mark. We limit the amount of data copied to 1024 characters, and carefully sanity check the source of that data. While these restrictions would doubtless be unacceptable in a general-purpose logging facility, even this limited facility seems like an improvement over the status quo ante. Marti Raudsepp, reviewed by PDXPUG and myself
* Stamp copyrights for year 2011.Bruce Momjian2011-01-011-1/+1
|
* Remove cvs keywords from all files.Magnus Hagander2010-09-201-1/+1
|
* Update copyright for the year 2010.Bruce Momjian2010-01-021-2/+2
|
* Update copyright for 2009.Bruce Momjian2009-01-011-2/+2
|
* Update copyrights in source tree to 2008.Bruce Momjian2008-01-011-2/+2
|
* Fix the inadvertent libpq ABI breakage discovered by Martin Pitt: theTom Lane2007-10-131-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | renumbering of encoding IDs done between 8.2 and 8.3 turns out to break 8.2 initdb and psql if they are run with an 8.3beta1 libpq.so. For the moment we can rearrange the order of enum pg_enc to keep the same number for everything except PG_JOHAB, which isn't a problem since there are no direct references to it in the 8.2 programs anyway. (This does force initdb unfortunately.) Going forward, we want to fix things so that encoding IDs can be changed without an ABI break, and this commit includes the changes needed to allow libpq's encoding IDs to be treated as fully independent of the backend's. The main issue is that libpq clients should not include pg_wchar.h or otherwise assume they know the specific values of libpq's encoding IDs, since they might encounter version skew between pg_wchar.h and the libpq.so they are using. To fix, have libpq officially export functions needed for encoding name<=>ID conversion and validity checking; it was doing this anyway unofficially. It's still the case that we can't renumber backend encoding IDs until the next bump in libpq's major version number, since doing so will break the 8.2-era client programs. However the code is now prepared to avoid this type of problem in future. Note that initdb is no longer a libpq client: we just pull in the two source files we need directly. The patch also fixes a few places that were being sloppy about checking for an unrecognized encoding name.
* Update CVS HEAD for 2007 copyright. Back branches are typically notBruce Momjian2007-01-051-2/+2
| | | | back-stamped for this.
* Remove 576 references of include files that were not needed.Bruce Momjian2006-07-141-2/+1
|
* Sort reference of include files, "A" - "F".Bruce Momjian2006-07-111-2/+2
|
* Update copyright for 2006. Update scripts.Bruce Momjian2006-03-051-2/+2
|
* Standard pgindent run for 8.1.Bruce Momjian2005-10-151-3/+3
|
* Suppress signed-vs-unsigned-char warnings.Tom Lane2005-09-241-5/+5
|
* Update copyrights that were missed.Bruce Momjian2005-01-011-2/+2
|
* Add support for Latin9 encoding in to_ascii(). Jaime CasanovaTom Lane2004-12-201-2/+10
|
* Pgindent run for 8.0.Bruce Momjian2004-08-291-3/+3
|
* Update copyright to 2004.Bruce Momjian2004-08-291-2/+2
|
* $Header: -> $PostgreSQL Changes ...PostgreSQL Daemon2003-11-291-1/+1
|
* Various message fixes, among those fixes for the previous round of fixesPeter Eisentraut2003-09-261-2/+2
|
* Fix some copyright notices that weren't updated. Improve copyright toolTom Lane2003-08-041-2/+2
| | | | so it won't miss 'em again.
* pgindent run.Bruce Momjian2003-08-041-11/+11
|
* Error message editing in utils/adt. Again thanks to Joe Conway for doingTom Lane2003-07-271-3/+5
| | | | the bulk of the heavy lifting ...
* Fix a *second* buffer overrun bug in to_ascii(). Grumble.Tom Lane2003-07-141-48/+35
|
* Fix buffer overrun in to_ascii(), per report from Guido Notari.Tom Lane2003-04-021-5/+6
|
* Remove #ifdef MULTIBYTE per hackers list discussion.Tatsuo Ishii2002-08-291-43/+1
|
* New pgindent run with fixes suggested by Tom. Patch manually reviewed,Bruce Momjian2001-11-051-2/+2
| | | | initdb/regression tests pass.
* Another pgindent run. Fixes enum indenting, and improves #endifBruce Momjian2001-10-281-1/+2
| | | | spacing. Also adds space for one-line comments.
* pgindent run on all C files. Java run to follow. initdb/regressionBruce Momjian2001-10-251-26/+22
| | | | tests pass.
* Commit Karel's patch.Tatsuo Ishii2001-09-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ------------------------------------------------------------------- Subject: Re: [PATCHES] encoding names From: Karel Zak <zakkr@zf.jcu.cz> To: Peter Eisentraut <peter_e@gmx.net> Cc: pgsql-patches <pgsql-patches@postgresql.org> Date: Fri, 31 Aug 2001 17:24:38 +0200 On Thu, Aug 30, 2001 at 01:30:40AM +0200, Peter Eisentraut wrote: > > - convert encoding 'name' to 'id' > > I thought we decided not to add functions returning "new" names until we > know exactly what the new names should be, and pending schema Ok, the patch not to add functions. > better > > ...(): encoding name too long Fixed. I found new bug in command/variable.c in parse_client_encoding(), nobody probably never see this error: if (pg_set_client_encoding(encoding)) { elog(ERROR, "Conversion between %s and %s is not supported", value, GetDatabaseEncodingName()); } because pg_set_client_encoding() returns -1 for error and 0 as true. It's fixed too. IMHO it can be apply. Karel PS: * following files are renamed: src/utils/mb/Unicode/KOI8_to_utf8.map --> src/utils/mb/Unicode/koi8r_to_utf8.map src/utils/mb/Unicode/WIN_to_utf8.map --> src/utils/mb/Unicode/win1251_to_utf8.map src/utils/mb/Unicode/utf8_to_KOI8.map --> src/utils/mb/Unicode/utf8_to_koi8r.map src/utils/mb/Unicode/utf8_to_WIN.map --> src/utils/mb/Unicode/utf8_to_win1251.map * new file: src/utils/mb/encname.c * removed file: src/utils/mb/common.c -- Karel Zak <zakkr@zf.jcu.cz> http://home.zf.jcu.cz/~zakkr/ C, PostgreSQL, PHP, WWW, http://docs.linux.cz, http://mape.jcu.cz
* Remove dashes in comments that don't need them, rewrap with pgindent.Bruce Momjian2001-03-221-9/+8
|
* pgindent run. Make it all clean.Bruce Momjian2001-03-221-53/+53
|
* Change Copyright from PostgreSQL, Inc to PostgreSQL Global Development Group.Bruce Momjian2001-01-241-2/+2
|
* Minor cleanup.Tom Lane2000-10-251-10/+4
|
* Tired of seeing these warnings ...Tom Lane2000-08-261-2/+5
|
* > I had to back out the patch. It only compiles with multi-byte enabled.Bruce Momjian2000-08-051-0/+201
| | | | | | | | | | | | | | Ooops, I forget... here it is again. > > > If encoding is not supported returns ERROR. and if multibyte not enabled too.... Thanks. Karel ~
* Back out to_ascii patch from Karel.Bruce Momjian2000-08-041-159/+0
|
* Add missing files from Karel, tip from Jan.Bruce Momjian2000-08-041-0/+159