- Jun 21, 2017
-
-
Tom Lane authored
Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. 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
-
- Mar 13, 2017
-
-
Noah Misch authored
This makes almost all core code follow the policy introduced in the previous commit. Specific decisions: - Text search support functions with char* and length arguments, such as prsstart and lexize, may receive unaligned strings. I doubt maintainers of non-core text search code will notice. - Use plain VARDATA() on values detoasted or synthesized earlier in the same function. Use VARDATA_ANY() on varlenas sourced outside the function, even if they happen to always have four-byte headers. As an exception, retain the universal practice of using VARDATA() on return values of SendFunctionCall(). - Retain PG_GETARG_BYTEA_P() in pageinspect. (Page images are too large for a one-byte header, so this misses no optimization.) Sites that do not call get_page_from_raw() typically need the four-byte alignment. - For now, do not change btree_gist. Its use of four-byte headers in memory is partly entangled with storage of 4-byte headers inside GBT_VARKEY, on disk. - For now, do not change gtrgm_consistent() or gtrgm_distance(). They incorporate the varlena header into a cache, and there are multiple credible implementation strategies to consider.
-
Noah Misch authored
Detect fclose() failures; given "ln -s /dev/full $PGDATA/devfull", "pg_file_write('devfull', 'x', true)" now fails as it should. Don't leak a stream when fwrite() fails. Remove a born-ineffective test that aimed to skip zero-length writes. Back-patch to 9.2 (all supported versions).
-
- Jan 03, 2017
-
-
Bruce Momjian authored
-
- Jan 02, 2016
-
-
Bruce Momjian authored
Backpatch certain files through 9.1
-
- Jan 06, 2015
-
-
Bruce Momjian authored
Backpatch certain files through 9.0
-
- Jul 14, 2014
-
-
Noah Misch authored
Prominent binaries already had this metadata. A handful of minor binaries, such as pg_regress.exe, still lack it; efforts to eliminate such exceptions are welcome. Michael Paquier, reviewed by MauMau.
-
- Apr 18, 2014
-
-
Peter Eisentraut authored
Because of gcc -Wmissing-prototypes, all functions in dynamically loadable modules must have a separate prototype declaration. This is meant to detect global functions that are not declared in header files, but in cases where the function is called via dfmgr, this is redundant. Besides filling up space with boilerplate, this is a frequent source of compiler warnings in extension modules. We can fix that by creating the function prototype as part of the PG_FUNCTION_INFO_V1 macro, which such modules have to use anyway. That makes the code of modules cleaner, because there is one less place where the entry points have to be listed, and creates an additional check that functions have the right prototype. Remove now redundant prototypes from contrib and other modules.
-
- Jan 07, 2014
-
-
Bruce Momjian authored
Update all files in head, and files COPYRIGHT and legal.sgml in all back branches.
-
- Oct 13, 2013
-
-
Peter Eisentraut authored
Add asprintf(), pg_asprintf(), and psprintf() to simplify string allocation and composition. Replacement implementations taken from NetBSD. Reviewed-by:
Álvaro Herrera <alvherre@2ndquadrant.com> Reviewed-by:
Asif Naeem <anaeem.it@gmail.com>
-
- Jan 01, 2013
-
-
Bruce Momjian authored
Fully update git head, and update back branches in ./COPYRIGHT and legal.sgml files.
-
- Jan 02, 2012
-
-
Bruce Momjian authored
-
- Oct 12, 2011
-
-
Tom Lane authored
We have seen one too many reports of people trying to use 9.1 extension files in the old-fashioned way of sourcing them in psql. Not only does that usually not work (due to failure to substitute for MODULE_PATHNAME and/or @extschema@), but if it did work they'd get a collection of loose objects not an extension. To prevent this, insert an \echo ... \quit line that prints a suitable error message into each extension script file, and teach commands/extension.c to ignore lines starting with \echo. That should not only prevent any adverse consequences of loading a script file the wrong way, but make it crystal clear to users that they need to do it differently now. Tom Lane, following an idea of Andrew Dunstan's. Back-patch into 9.1 ... there is not going to be much value in this if we wait till 9.2.
-
- Apr 10, 2011
-
-
Bruce Momjian authored
-
- Feb 14, 2011
-
-
Tom Lane authored
From first pass of testing. Notably, there seems to be no need for adminpack--unpackaged--1.0.sql because none of the objects that the old module creates would ever be dumped by pg_dump anyway (they are all in pg_catalog).
-
Tom Lane authored
It was never terribly consistent to use OR REPLACE (because of the lack of comparable functionality for data types, operators, etc), and experimentation shows that it's now positively pernicious in the extension world. We really want a failure to occur if there are any conflicts, else it's unclear what the extension-ownership state of the conflicted object ought to be. Most of the time, CREATE EXTENSION will fail anyway because of conflicts on other object types, but an extension defining only functions can succeed, with bad results.
-
Tom Lane authored
This isn't fully tested as yet, in particular I'm not sure that the "foo--unpackaged--1.0.sql" scripts are OK. But it's time to get some buildfarm cycles on it. sepgsql is not converted to an extension, mainly because it seems to require a very nonstandard installation process. Dimitri Fontaine and Tom Lane
-
- Feb 12, 2011
-
-
Bruce Momjian authored
relative, by creating a function path_is_relative_and_below_cwd() to check for specific requirements. It is unclear if this fixes a security problem or not but the new code is more robust.
-
- Jan 01, 2011
-
-
Bruce Momjian authored
-
- Sep 22, 2010
-
-
Magnus Hagander authored
-
- Sep 20, 2010
-
-
Magnus Hagander authored
-
- Jan 02, 2010
-
-
Bruce Momjian authored
-
- Jan 01, 2009
-
-
Bruce Momjian authored
-
- Mar 25, 2008
-
-
Tom Lane authored
strings. This patch introduces four support functions cstring_to_text, cstring_to_text_with_len, text_to_cstring, and text_to_cstring_buffer, and two macros CStringGetTextDatum and TextDatumGetCString. A number of existing macros that provided variants on these themes were removed. Most of the places that need to make such conversions now require just one function or macro call, in place of the multiple notational layers that used to be needed. There are no longer any direct calls of textout or textin, and we got most of the places that were using handmade conversions via memcpy (there may be a few still lurking, though). This commit doesn't make any serious effort to eliminate transient memory leaks caused by detoasting toasted text objects before they reach text_to_cstring. We changed PG_GETARG_TEXT_P to PG_GETARG_TEXT_PP in a few places where it was easy, but much more could be done. Brendan Jurd and Tom Lane
-
- Jan 01, 2008
-
-
Bruce Momjian authored
-
- Nov 13, 2007
-
-
Bruce Momjian authored
-
Tom Lane authored
Remove setting of search_path in install/uninstall scripts, since unlike other contrib modules this one does not want to let you change the installation schema.
-
- Nov 11, 2007
-
-
Bruce Momjian authored
remove transactions use create or replace function make formatting consistent set search patch on first line Add documentation on modifying *.sql to set the search patch, and mention that major upgrades should still run the installation scripts. Some of these issues were spotted by Tom today.
-
Bruce Momjian authored
-
Bruce Momjian authored
or will never be converted.
-
- Jun 27, 2007
-
-
Tom Lane authored
installations whose pg_config program does not appear first in the PATH. Per gripe from Eddie Stanley and subsequent discussions with Fabien Coelho and others.
-
- Feb 09, 2007
-
-
Peter Eisentraut authored
-
- Jan 10, 2007
-
-
Bruce Momjian authored
-
- Nov 06, 2006
-
-
Tom Lane authored
the backend should rely on its working-directory setting instead. Also do some message-style police work in contrib/adminpack.
-
- Oct 20, 2006
-
-
Tom Lane authored
and avoid scribbling on its result (might be safe but why risk it)
-
- Oct 19, 2006
-
-
Tom Lane authored
from Magnus that MSVC complains about this.
-
Neil Conway authored
-
- Oct 04, 2006
-
-
Bruce Momjian authored
-
- Sep 30, 2006
-
-
Tom Lane authored
-
- Jul 11, 2006
-
-
Bruce Momjian authored
-