Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on May 20, 2015
  1. @hlinnaka

    Collection of typo fixes.

    hlinnaka authored
    Use "a" and "an" correctly, mostly in comments. Two error messages were
    also fixed (they were just elogs, so no translation work required). Two
    function comments in pg_proc.h were also fixed. Etsuro Fujita reported one
    of these, but I found a lot more with grep.
    Also fix a few other typos spotted while grepping for the a/an typos.
    For example, "consists out of ..." -> "consists of ...". Plus a "though"/
    "through" mixup reported by Euler Taveira.
    Many of these typos were in old code, which would be nice to backpatch to
    make future backpatching easier. But much of the code was new, and I didn't
    feel like crafting separate patches for each branch. So no backpatching.
Commits on May 9, 2015
  1. @adunstan

    Add new OID alias type regrole

    adunstan authored
    The new type has the scope of whole the database cluster so it doesn't
    behave the same as the existing OID alias types which have database
    concerning object dependency. To avoid confusion constants of the new
    type are prohibited from appearing where dependencies are made involving
    Also, add a note to the docs about possible MVCC violation and
    optimization issues, which are general over the all reg* types.
    Kyotaro Horiguchi
Commits on Feb 21, 2015
  1. Use FLEXIBLE_ARRAY_MEMBER in a number of other places.

    Tom Lane authored
    I think we're about done with this...
Commits on Aug 25, 2014
  1. @anarazel

    Fix typos in some error messages thrown by extension scripts when fed…

    anarazel authored
    … to psql.
    Some of the many error messages introduced in 458857c missed 'FROM
    unpackaged'. Also e016b72 and 45ffeb7 forgot to quote extension
    version numbers.
    Backpatch to 9.1, just like 458857c which introduced the messages. Do
    so because the error messages thrown when the wrong command is copy &
    pasted aren't easy to understand.
Commits on Jul 14, 2014
  1. @nmisch

    Add file version information to most installed Windows binaries.

    nmisch 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.
Commits on May 6, 2014
  1. @bmomjian

    pgindent run for 9.4

    bmomjian authored
    This includes removing tabs after periods in C comments, which was
    applied to back branches, so this change should not effect backpatching.
Commits on Apr 18, 2014
  1. @petere

    Create function prototype as part of PG_FUNCTION_INFO_V1 macro

    petere 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.
Commits on Oct 13, 2013
  1. @petere

    Add use of asprintf()

    petere authored
    Add asprintf(), pg_asprintf(), and psprintf() to simplify string
    allocation and composition.  Replacement implementations taken from
    Reviewed-by: Álvaro Herrera <>
    Reviewed-by: Asif Naeem <>
Commits on Jun 10, 2012
  1. @bmomjian
Commits on Oct 12, 2011
  1. Throw a useful error message if an extension script file is fed to psql.

    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.
Commits on Sep 16, 2011
  1. Redesign the plancache mechanism for more flexibility and efficiency.

    Tom Lane authored
    Rewrite plancache.c so that a "cached plan" (which is rather a misnomer
    at this point) can support generation of custom, parameter-value-dependent
    plans, and can make an intelligent choice between using custom plans and
    the traditional generic-plan approach.  The specific choice algorithm
    implemented here can probably be improved in future, but this commit is
    all about getting the mechanism in place, not the policy.
    In addition, restructure the API to greatly reduce the amount of extraneous
    data copying needed.  The main compromise needed to make that possible was
    to split the initial creation of a CachedPlanSource into two steps.  It's
    worth noting in particular that SPI_saveplan is now deprecated in favor of
    SPI_keepplan, which accomplishes the same end result with zero data
    copying, and no need to then spend even more cycles throwing away the
    original SPIPlan.  The risk of long-term memory leaks while manipulating
    SPIPlans has also been greatly reduced.  Most of this improvement is based
    on use of the recently-added MemoryContextSetParent primitive.
Commits on Sep 9, 2011
  1. Move Timestamp/Interval typedefs and basic macros into datatype/times…

    Tom Lane authored
    As per my recent proposal, this refactors things so that these typedefs and
    macros are available in a header that can be included in frontend-ish code.
    I also changed various headers that were undesirably including
    utils/timestamp.h to include datatype/timestamp.h instead.  Unsurprisingly,
    this showed that half the system was getting utils/timestamp.h by way of
    No actual code changes here, just header refactoring.
Commits on Jul 4, 2011
  1. @alvherre

    Move Trigger and TriggerDesc structs out of rel.h into a new reltrigg…

    alvherre authored
    This lets us stop including rel.h into execnodes.h, which is a widely
    used header.
Commits on May 31, 2011
  1. @petere

    Recode non-ASCII characters in source to UTF-8

    petere authored
    For consistency, have all non-ASCII characters from contributors'
    names in the source be in UTF-8.  But remove some other more
    gratuitous uses of non-ASCII characters.
Commits on Apr 10, 2011
  1. @bmomjian
Commits on Feb 14, 2011
  1. Avoid use of CREATE OR REPLACE FUNCTION in extension installation files.

    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.
  2. Convert contrib modules to use the extension facility.

    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
Commits on Nov 23, 2010
  1. @petere
Commits on Nov 4, 2010
  1. Allow moddatetime's target column to be of type timestamptz.

    Tom Lane authored
    Dirk Heinrichs
Commits on Oct 8, 2010

    Tom Lane authored
    Various places were testing TRIGGER_FIRED_BEFORE() where what they really
    meant was !TRIGGER_FIRED_AFTER(), or vice versa.  This needs to be cleaned
    up because there are about to be more than two possible states.
    We might want to note this in the 9.1 release notes as something for
    trigger authors to double-check.
    For consistency's sake I also changed some places that assumed that
    mutually exclusive; that's not in immediate danger of breaking, but
    it's still sloppier than it should be.
    Extracted from Dean Rasheed's patch for triggers on views.  I'm committing
    this separately since it's an identifiable separate issue, and is the
    only reason for the patch to touch most of these particular files.
Commits on Sep 22, 2010
  1. @mhagander
Commits on Sep 20, 2010
  1. @mhagander
Commits on Aug 19, 2010
  1. @petere
Commits on Jul 5, 2010
  1. Fix a few single-file (MODULES, not MODULE_big) contrib makefiles tha…

    Tom Lane authored
    …t were
    supposing that they should set SHLIB_LINK rather than LDFLAGS_SL.  Since these
    don't go through Makefile.shlib that was a no-op on most platforms.  Also
    regularize the few platform-specific Makefiles that did pay attention to
    SHLIB_LINK: it seems that the real value of that is to pull in BE_DLLLIBS,
    so do that instead.  Per buildfarm failures on cygwin.
Commits on Jun 11, 2009
  1. @bmomjian
Commits on Jan 7, 2009
  1. Fix executor/spi.h to follow our usual conventions for include files,…

    Tom Lane authored
    … ie,
    not include postgres.h nor anything else it doesn't directly need.  Add
    #includes to calling files as needed to compensate.  Per my proposal of
    This should be noted as a source code change in the 8.4 release notes,
    since it's likely to require changes in add-on modules.
Commits on May 17, 2008
  1. @adunstan

    Add $PostgreSQL$ markers to a lot of files that were missing them.

    adunstan authored
    This particular batch was just for *.c and *.h file.
    The changes were made with the following 2 commands:
    find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o  \( -name '*.[ch]'  \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | while read file ; do head -n 1 < $file | grep -q '^/\*' && echo $file; done | xargs -l sed -i -e '1s/^\// /' -e '1i/*\n * $PostgreSQL:$ \n *'
    find . \( \( -name 'libstemmer' -o -name 'expected' -o -name 'ppport.h' \) -prune \) -o  \( -name '*.[ch]'  \) \( -exec grep -q '\$PostgreSQL' {} \; -o -print \) | xargs -l sed -i -e '1i/*\n * $PostgreSQL:$ \n */'
Commits on Mar 25, 2008
  1. Simplify and standardize conversions between TEXT datums and ordinary C

    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
Commits on Dec 3, 2007
  1. Remove contrib/spi/preprocessor, which has been uninteresting ever

    Tom Lane authored
    since we supported standard FOREIGN KEY constraint syntax.  It was
    harmless enough just sitting there, but the prospect of having to
    document it is surely more work than it's worth.
  2. Remove obsoleted README files.

    Tom Lane authored
Commits on Nov 13, 2007
  1. @bmomjian
Commits on Jun 26, 2007
  1. Fix PGXS conventions so that extensions can be built against Postgres

    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.
Commits on Mar 15, 2007
  1. Make use of plancache module for SPI plans. In particular, since plpgsql

    Tom Lane authored
    uses SPI plans, this finally fixes the ancient gotcha that you can't
    drop and recreate a temp table used by a plpgsql function.
    Along the way, clean up SPI's API a little bit by declaring SPI plan
    pointers as "SPIPlanPtr" instead of "void *".  This is cosmetic but
    helps to forestall simple programming mistakes.  (I have changed some
    but not all of the callers to match; there are still some "void *"'s
    in contrib and the PL's.  This is intentional so that we can see if
    anyone's compiler complains about it.)
Commits on Feb 1, 2007
  1. @bmomjian

    Wording cleanup for error messages. Also change can't -> cannot.

    bmomjian authored
    Standard English uses "may", "can", and "might" in different ways:
            may - permission, "You may borrow my rake."
            can - ability, "I can lift that log."
            might - possibility, "It might rain today."
    Unfortunately, in conversational English, their use is often mixed, as
    in, "You may use this variable to do X", when in fact, "can" is a better
    choice.  Similarly, "It may crash" is better stated, "It might crash".
Commits on Jul 11, 2006
  1. @bmomjian
Something went wrong with that request. Please try again.