mirror of
https://github.com/postgres/postgres.git
synced 2026-02-16 09:08:23 -05:00
this is an old patch which I have already submitted and never seen
in the sources. It corrects the datatype oids used in some iterator
functions. This bug has been reported to me by many other people.
contrib-datetime.patch
some code contributed by Reiner Dassing <dassing@wettzell.ifag.de>
contrib-makefiles.patch
fixes all my contrib makefiles which don't work with some compilers,
as reported to me by another user.
contrib-miscutil.patch
an old patch for one of my old contribs.
contrib-string.patch
a small change to the c-like text output functions. Now the '{'
is escaped only at the beginning of the string to distinguish it
from arrays, and the '}' is no more escaped.
elog-lineno.patch
adds the current lineno of CopyFrom to elog messages. This is very
useful when you load a 1 million tuples table from an external file
and there is a bad value somehere. Currently you get an error message
but you can't know where is the bad data. The patch uses a variable
which was declared static in copy.c. The variable is now exported
and initialized to 0. It is always cleared at the end of the copy
or at the first elog message or when the copy is canceled.
I know this is very ugly but I can't find any better way of knowing
where the copy fails and I have this problem quite often.
plperl-makefile.patch
fixes a typo in a makefile, but the error must be elsewhere because
it is a file generated automatically. Please have a look.
tprintf-timestamp.patch
restores the original 2-digit year format, assuming that the two
century digits don't carry much information and that '000202' is
easier to read than 20000202. Being only a log file it shouldn't
break anything.
Please apply the patches before the next scheduled code freeze.
I also noticed that some of the contribs don't compile correcly. Should we
ask people to fix their code or rename their makefiles so that they are
ignored by the top makefile?
--
Massimo Dal Zotto
89 lines
2.1 KiB
C
89 lines
2.1 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* trace.h
|
|
*
|
|
* Conditional trace definitions.
|
|
*
|
|
* Massimo Dal Zotto <dz@cs.unitn.it>
|
|
*
|
|
*-------------------------------------------------------------------------
|
|
*/
|
|
|
|
#ifndef TRACE_H
|
|
#define TRACE_H
|
|
|
|
#include <string.h>
|
|
#include <time.h>
|
|
|
|
#ifdef ELOG_TIMESTAMPS
|
|
char *tprintf_timestamp(void);
|
|
|
|
#define TIMESTAMP_SIZE 28
|
|
#else
|
|
#define TIMESTAMP_SIZE 0
|
|
#endif
|
|
|
|
extern int tprintf(int flag, const char *fmt,...);
|
|
extern int eprintf(const char *fmt,...);
|
|
extern void write_syslog(int level, char *line);
|
|
extern void show_options(void);
|
|
extern void parse_options(char *str, bool secure);
|
|
extern void read_pg_options(SIGNAL_ARGS);
|
|
|
|
/*
|
|
* Trace options, used as index into pg_options.
|
|
* Must match the constants in pg_options[].
|
|
*/
|
|
enum pg_option_enum {
|
|
TRACE_ALL, /* 0=trace some, 1=trace all, -1=trace none */
|
|
TRACE_VERBOSE,
|
|
TRACE_QUERY,
|
|
TRACE_PLAN,
|
|
TRACE_PARSE,
|
|
TRACE_REWRITTEN,
|
|
TRACE_PRETTY_PLAN, /* indented multiline versions of trees */
|
|
TRACE_PRETTY_PARSE,
|
|
TRACE_PRETTY_REWRITTEN,
|
|
TRACE_PARSERSTATS,
|
|
TRACE_PLANNERSTATS,
|
|
TRACE_EXECUTORSTATS,
|
|
TRACE_SHORTLOCKS, /* currently unused but needed, see lock.c */
|
|
TRACE_LOCKS,
|
|
TRACE_USERLOCKS,
|
|
TRACE_SPINLOCKS,
|
|
TRACE_NOTIFY,
|
|
TRACE_MALLOC,
|
|
TRACE_PALLOC,
|
|
TRACE_LOCKOIDMIN,
|
|
TRACE_LOCKRELATION,
|
|
OPT_LOCKREADPRIORITY, /* lock priority, see lock.c */
|
|
OPT_DEADLOCKTIMEOUT, /* deadlock timeout, see proc.c */
|
|
OPT_NOFSYNC, /* turn fsync off */
|
|
OPT_SYSLOG, /* use syslog for error messages */
|
|
OPT_HOSTLOOKUP, /* enable hostname lookup in ps_status */
|
|
OPT_SHOWPORTNUMBER, /* show port number in ps_status */
|
|
|
|
NUM_PG_OPTIONS /* must be the last item of enum */
|
|
};
|
|
|
|
extern int pg_options[NUM_PG_OPTIONS];
|
|
|
|
#ifdef __GNUC__
|
|
#define PRINTF(args...) tprintf1(args)
|
|
#define EPRINTF(args...) eprintf(args)
|
|
#define TPRINTF(flag, args...) tprintf(flag, args)
|
|
#else
|
|
#define PRINTF tprintf1
|
|
#define EPRINTF eprintf
|
|
#define TPRINTF tprintf
|
|
#endif
|
|
|
|
#endif /* TRACE_H */
|
|
|
|
/*
|
|
* Local variables:
|
|
* tab-width: 4
|
|
* c-indent-level: 4
|
|
* c-basic-offset: 4
|
|
* End:
|
|
*/
|