Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: [PATCHES] [badalex(at)gmail(dot)com: Re: [BUGS] Problem identifying constraints which should not be inherited]



On Mon, Mar 31, 2008 at 2:36 AM, NikhilS <nikkhils(at)gmail(dot)com> wrote:
> Hi Alex,

> I was taking a look at this patch to add the pg_dump related changes. Just
> wanted to give you a heads up as this patch crashes if we run "make
> installcheck". Seems there is an issue introduced in the CREATE TABLE
> REFERENCES code path due to your patch (this is without my pg_dump changes
> just to be sure).  Looks like some memory overwrite issue. The trace is as
> follows:

Ouch, sorry i did not reply sooner... been out with the flu.  Oddly
enough make check and make installcheck worked great on my 64 bit box.
 But on my laptop(32 bits) make check lights up like a christmas tree.
 Which is why I did not notice the problem. :(

Attached is a patch that fixes the problem... (it was debugging from
an earlier version)
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index f105d39..7d12156 100644
*** a/src/backend/parser/parse_utilcmd.c
--- /bsrc/backend/parser/parse_utilcmd.c
*************** transformColumnDefinition(ParseState *ps
*** 409,417 ****
  	{
  		constraint = lfirst(clist);
  
- 		constraint->is_local = true;
- 		constraint->inhcount = 0;
- 
  		/*
  		 * If this column constraint is a FOREIGN KEY constraint, then we fill
  		 * in the current attribute's name and throw it into the list of FK
--- 409,414 ----


Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group