Re: [PATCHES] domain constraints and UNKNOWN params

2006-01-11 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > On Wed, 2006-01-11 at 23:31 -0500, Tom Lane wrote: >> I wonder whether there is any reasonably simple way to audit the whole >> backend for missing domain processing... > I don't really see a way to > check the code that doesn't require a fair amount of ma

Re: [PATCHES] domain constraints and UNKNOWN params

2006-01-11 Thread Neil Conway
On Wed, 2006-01-11 at 23:31 -0500, Tom Lane wrote: > This is a good catch, but the patch's added check on targetTyptype is a > waste of code and cycles. coerce_to_domain is perfectly capable of > doing nothing when nothing is called for. Ah, right. Attached is a corrected patch. > I wonder wheth

Re: [PATCHES] Free WAL caches on switching segments

2006-01-11 Thread ITAGAKI Takahiro
Bruce Momjian wrote: > > > > Here is a small patch to prevent undesired WAL file caching by kernel. > > > > posix_fadvise(POSIX_FADV_DONTNEED) attempts to free cached pages and > > > > the kernel will discard them in preference to other data caches. > > > > > > On plenty of platforms, this won't

Re: [PATCHES] domain constraints and UNKNOWN params

2006-01-11 Thread Tom Lane
Neil Conway <[EMAIL PROTECTED]> writes: > I've also attached a patch that should fix the issue -- coerce_type() > neglected to apply coerce_to_domain() to the type inferred for an > UNKNOWN Param. This is a good catch, but the patch's added check on targetTyptype is a waste of code and cycles. co

[PATCHES] domain constraints and UNKNOWN params

2006-01-11 Thread Neil Conway
David Wheeler reported the following bug: when a protocol-level prepared statement with a parameter of UNKNOWN type is used, any domain constraints that are associated with the inferred type of the parameter are not checked when the statement is executed. Attached is a script David sent me to repro

Re: [PATCHES] [HACKERS] Inconsistent syntax in GRANT

2006-01-11 Thread Bruce Momjian
Tom Lane wrote: > Bruce Momjian writes: > > Tom Lane wrote: > >> Just ignore the inapplicable permissions during pg_dump. I think you're > >> making this harder than it needs to be... > > > check all permission bits > > call object-type-specific routine > > loop over each obj

Re: [PATCHES] TODO-item: Add sleep() function, remove from regress.c

2006-01-11 Thread Tom Lane
Joachim Wieland <[EMAIL PROTECTED]> writes: > I append a new version with the regression test ripped out. Applied with revisions. I concluded that the idea of computing the end-time in advance had merit, so I changed the code to do it that way. Aside from not allowing extra delay to accumulate in

[PATCHES] mbutils.c memory cxt cleanup

2006-01-11 Thread Neil Conway
Attached is a patch that changes mbutils.c to perform some long-term allocations in its own memory context, rather than using TopMemoryContext. This makes it easier to reclaim the memory that is allocated: fmgr_info() might perform allocations in the current memory context, so resetting that contex