~ubuntu-branches/ubuntu/saucy/postgresql-8.4/saucy

« back to all changes in this revision

Viewing changes to src/interfaces/ecpg/preproc/pgc.c

  • Committer: Package Import Robot
  • Author(s): Martin Pitt
  • Date: 2011-12-02 14:46:33 UTC
  • mfrom: (13.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20111202144633-azdcoyqh7sduwr15
Tags: 8.4.10-1
* New upstream bug fix release:
  - Fix bugs in information_schema.referential_constraints view.
    This view was being insufficiently careful about matching the
    foreign-key constraint to the depended-on primary or unique key
    constraint. That could result in failure to show a foreign key
    constraint at all, or showing it multiple times, or claiming that
    it depends on a different constraint than the one it really does.
    Since the view definition is installed by initdb, merely upgrading
    will not fix the problem. If you need to fix this in an existing
    installation, you can (as a superuser) drop the information_schema
    schema then re-create it by sourcing
    "SHAREDIR/information_schema.sql". (Run pg_config --sharedir if
    you're uncertain where "SHAREDIR" is.) This must be repeated in
    each database to be fixed.
  - Fix incorrect replay of WAL records for GIN index updates.
    This could result in transiently failing to find index entries
    after a crash, or on a hot-standby server. The problem would be
    repaired by the next "VACUUM" of the index, however.
  - Fix TOAST-related data corruption during CREATE TABLE dest AS
    SELECT - FROM src or INSERT INTO dest SELECT * FROM src.
    If a table has been modified by "ALTER TABLE ADD COLUMN", attempts
    to copy its data verbatim to another table could produce corrupt
    results in certain corner cases. The problem can only manifest in
    this precise form in 8.4 and later, but we patched earlier versions
    as well in case there are other code paths that could trigger the
    same bug.
  - Fix race condition during toast table access from stale syscache
    entries.
  - Track dependencies of functions on items used in parameter default
    expressions. Previously, a referenced object could be dropped without
    having dropped or modified the function, leading to misbehavior when the
    function was used. Note that merely installing this update will not fix
    the missing dependency entries; to do that, you'd need to "CREATE OR
    REPLACE" each such function afterwards. If you have functions whose
    defaults depend on non-built-in objects, doing so is recommended.
  - Allow inlining of set-returning SQL functions with multiple OUT
    parameters.
  - Make DatumGetInetP() unpack inet datums that have a 1-byte header,
    and add a new macro, DatumGetInetPP(), that does not.
  - Improve locale support in money type's input and output.
    Aside from not supporting all standard lc_monetary formatting
    options, the input and output functions were inconsistent, meaning
    there were locales in which dumped money values could not be
    re-read.
  - Don't let transform_null_equals affect CASE foo WHEN NULL ...
    constructs. transform_null_equals is only supposed to affect foo = NULL
    expressions written directly by the user, not equality checks
    generated internally by this form of CASE.
  - Change foreign-key trigger creation order to better support
    self-referential foreign keys. For a cascading foreign key that
    references its own table, a row update will fire both the ON UPDATE
    trigger and the CHECK trigger as one event. The ON UPDATE trigger must
    execute first, else the CHECK will check a non-final state of the row
    and possibly throw an inappropriate error. However, the firing order of
    these triggers is determined by their names, which generally sort in
    creation order since the triggers have auto-generated names following
    the convention "RI_ConstraintTrigger_NNNN". A proper fix would require
    modifying that convention, which we will do in 9.2, but it seems risky
    to change it in existing releases. So this patch just changes the
    creation order of the triggers. Users encountering this type of error
    should drop and re-create the foreign key constraint to get its triggers
    into the right order.
  - Avoid floating-point underflow while tracking buffer allocation
    rate.
  - Preserve blank lines within commands in psql's command history.
    The former behavior could cause problems if an empty line was
    removed from within a string literal, for example.
  - Fix pg_dump to dump user-defined casts between auto-generated
    types, such as table rowtypes.
  - Use the preferred version of xsubpp to build PL/Perl, not
    necessarily the operating system's main copy.
  - Fix incorrect coding in "contrib/dict_int" and "contrib/dict_xsyn".
  - Honor query cancel interrupts promptly in pgstatindex().
  - Ensure VPATH builds properly install all server header files.
  - Shorten file names reported in verbose error messages.
    Regular builds have always reported just the name of the C file
    containing the error message call, but VPATH builds formerly
    reported an absolute path name.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
typedef unsigned char flex_uint8_t; 
55
55
typedef unsigned short int flex_uint16_t;
56
56
typedef unsigned int flex_uint32_t;
57
 
#endif /* ! C99 */
58
57
 
59
58
/* Limits of integral types. */
60
59
#ifndef INT8_MIN
85
84
#define UINT32_MAX             (4294967295U)
86
85
#endif
87
86
 
 
87
#endif /* ! C99 */
 
88
 
88
89
#endif /* ! FLEXINT_H */
89
90
 
90
91
#ifdef __cplusplus
141
142
 
142
143
/* Size of default input buffer. */
143
144
#ifndef YY_BUF_SIZE
 
145
#ifdef __ia64__
 
146
/* On IA-64, the buffer size is 16k, not 8k.
 
147
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 
148
 * Ditto for the __ia64__ case accordingly.
 
149
 */
 
150
#define YY_BUF_SIZE 32768
 
151
#else
144
152
#define YY_BUF_SIZE 16384
 
153
#endif /* __ia64__ */
145
154
#endif
146
155
 
147
156
/* The state buf must be large enough to hold one state per character in the main buffer.
1892
1901
 * Note that xcstart must appear before operator, as explained above!
1893
1902
 *      Also whitespace (comment) must appear before operator.
1894
1903
 */
1895
 
#line 1896 "pgc.c"
 
1904
#line 1905 "pgc.c"
1896
1905
 
1897
1906
#define INITIAL 0
1898
1907
#define C 1
1993
2002
 
1994
2003
/* Amount of stuff to slurp up with each read. */
1995
2004
#ifndef YY_READ_BUF_SIZE
 
2005
#ifdef __ia64__
 
2006
/* On IA-64, the buffer size is 16k, not 8k */
 
2007
#define YY_READ_BUF_SIZE 16384
 
2008
#else
1996
2009
#define YY_READ_BUF_SIZE 8192
 
2010
#endif /* __ia64__ */
1997
2011
#endif
1998
2012
 
1999
2013
/* Copy whatever the last rule matched to the standard output. */
2001
2015
/* This used to be an fputs(), but since the string might contain NUL's,
2002
2016
 * we now use fwrite().
2003
2017
 */
2004
 
#define ECHO fwrite( yytext, yyleng, 1, yyout )
 
2018
#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0)
2005
2019
#endif
2006
2020
 
2007
2021
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
2012
2026
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
2013
2027
                { \
2014
2028
                int c = '*'; \
2015
 
                int n; \
 
2029
                size_t n; \
2016
2030
                for ( n = 0; n < max_size && \
2017
2031
                             (c = getc( yyin )) != EOF && c != '\n'; ++n ) \
2018
2032
                        buf[n] = (char) c; \
2102
2116
                token_start = NULL;
2103
2117
 
2104
2118
 
2105
 
#line 2106 "pgc.c"
 
2119
#line 2120 "pgc.c"
2106
2120
 
2107
2121
        if ( !(yy_init) )
2108
2122
                {
3627
3641
#line 1176 "pgc.l"
3628
3642
YY_FATAL_ERROR( "flex scanner jammed" );
3629
3643
        YY_BREAK
3630
 
#line 3631 "pgc.c"
 
3644
#line 3645 "pgc.c"
3631
3645
 
3632
3646
        case YY_END_OF_BUFFER:
3633
3647
                {
4389
4403
 
4390
4404
/** Setup the input buffer state to scan the given bytes. The next call to yylex() will
4391
4405
 * scan from a @e copy of @a bytes.
4392
 
 * @param bytes the byte buffer to scan
4393
 
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 
4406
 * @param yybytes the byte buffer to scan
 
4407
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
4394
4408
 * 
4395
4409
 * @return the newly allocated buffer state object.
4396
4410
 */