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

« back to all changes in this revision

Viewing changes to contrib/cube/cubescan.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:
73
73
typedef unsigned char flex_uint8_t; 
74
74
typedef unsigned short int flex_uint16_t;
75
75
typedef unsigned int flex_uint32_t;
76
 
#endif /* ! C99 */
77
76
 
78
77
/* Limits of integral types. */
79
78
#ifndef INT8_MIN
104
103
#define UINT32_MAX             (4294967295U)
105
104
#endif
106
105
 
 
106
#endif /* ! C99 */
 
107
 
107
108
#endif /* ! FLEXINT_H */
108
109
 
109
110
#ifdef __cplusplus
160
161
 
161
162
/* Size of default input buffer. */
162
163
#ifndef YY_BUF_SIZE
 
164
#ifdef __ia64__
 
165
/* On IA-64, the buffer size is 16k, not 8k.
 
166
 * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case.
 
167
 * Ditto for the __ia64__ case accordingly.
 
168
 */
 
169
#define YY_BUF_SIZE 32768
 
170
#else
163
171
#define YY_BUF_SIZE 16384
 
172
#endif /* __ia64__ */
164
173
#endif
165
174
 
166
175
/* The state buf must be large enough to hold one state per character in the main buffer.
510
519
void cube_scanner_init(const char *str);
511
520
void cube_scanner_finish(void);
512
521
#define YY_NO_INPUT 1
513
 
#line 514 "cubescan.c"
 
522
#line 523 "cubescan.c"
514
523
 
515
524
#define INITIAL 0
516
525
 
589
598
 
590
599
/* Amount of stuff to slurp up with each read. */
591
600
#ifndef YY_READ_BUF_SIZE
 
601
#ifdef __ia64__
 
602
/* On IA-64, the buffer size is 16k, not 8k */
 
603
#define YY_READ_BUF_SIZE 16384
 
604
#else
592
605
#define YY_READ_BUF_SIZE 8192
 
606
#endif /* __ia64__ */
593
607
#endif
594
608
 
595
609
/* Copy whatever the last rule matched to the standard output. */
597
611
/* This used to be an fputs(), but since the string might contain NUL's,
598
612
 * we now use fwrite().
599
613
 */
600
 
#define ECHO fwrite( cube_yytext, cube_yyleng, 1, cube_yyout )
 
614
#define ECHO do { if (fwrite( cube_yytext, cube_yyleng, 1, cube_yyout )) {} } while (0)
601
615
#endif
602
616
 
603
617
/* Gets input and stuffs it into "buf".  number of characters read, or YY_NULL,
608
622
        if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
609
623
                { \
610
624
                int c = '*'; \
611
 
                int n; \
 
625
                size_t n; \
612
626
                for ( n = 0; n < max_size && \
613
627
                             (c = getc( cube_yyin )) != EOF && c != '\n'; ++n ) \
614
628
                        buf[n] = (char) c; \
693
707
#line 43 "cubescan.l"
694
708
 
695
709
 
696
 
#line 697 "cubescan.c"
 
710
#line 711 "cubescan.c"
697
711
 
698
712
        if ( !(yy_init) )
699
713
                {
818
832
#line 54 "cubescan.l"
819
833
YY_FATAL_ERROR( "flex scanner jammed" );
820
834
        YY_BREAK
821
 
#line 822 "cubescan.c"
 
835
#line 836 "cubescan.c"
822
836
case YY_STATE_EOF(INITIAL):
823
837
        yyterminate();
824
838
 
1536
1550
 
1537
1551
/** Setup the input buffer state to scan the given bytes. The next call to cube_yylex() will
1538
1552
 * scan from a @e copy of @a bytes.
1539
 
 * @param bytes the byte buffer to scan
1540
 
 * @param len the number of bytes in the buffer pointed to by @a bytes.
 
1553
 * @param yybytes the byte buffer to scan
 
1554
 * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
1541
1555
 * 
1542
1556
 * @return the newly allocated buffer state object.
1543
1557
 */