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

Re: [v9.2] DROP statement reworks

From: Kohei KaiGai <kaigai(at)kaigai(dot)gr(dot)jp>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, PgHacker <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [v9.2] DROP statement reworks
Date: 2011-10-10 17:38:43
Message-ID: CADyhKSXtZ1ibepMTJrN6eu4QB0mmJpamCO6MdDgZgq_GaXnm0w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-hackers
> OK, well, I applied pgsql-v9.2-drop-reworks-2.v4.1.patch and tried to
> compile, and got this:
>
> In file included from ../../../src/include/catalog/dependency.h:17,
>                 from dependency.c:19:
> ../../../src/include/catalog/objectaddress.h:21: warning: type
> defaults to ‘int’ in declaration of ‘ObjectAddress’
> ../../../src/include/catalog/objectaddress.h:21: error: expected ‘;’,
> ‘,’ or ‘)’ before ‘*’ token
>
> The problem here is pretty obvious: you've defined
> get_object_namespace, which takes an argument of type ObjectAddress,
> before defining the ObjectAddress datatype, which is the next thing in
> the same header file.  How does that even compile for you?
>
Sorry, I didn't write out dependency of the patches.
Please apply the patches in order of part-1, part-2 then part-3.

I checked correctness of the part-2 on the tree with the part-1 already.
Both of the part-1 and part-2 patches try to modify objectaddress.h,
and the part-2 tries to add get_object_namespace() definition around
the code added by the part-1, so the patch commands get confused
and moved the hunk in front of the definition of ObjectAddress.

  [kaigai(at)iwashi pgsql]$ cat
~/patch/pgsql-v9.2-drop-reworks-2.v4.1.patch | patch -p1
     :
  patching file src/backend/catalog/objectaddress.c
  Hunk #1 succeeded at 976 (offset -429 lines).
     :
  patching file src/include/catalog/objectaddress.h
  Hunk #1 succeeded at 17 with fuzz 2 (offset -18 lines).
     :
  patching file src/test/regress/expected/drop_if_exists.out

I'm sorry again. I tought it was obvious from the filenames.

* Part-1
  pgsql-v9.2-drop-reworks-1.v4.patch
* Part-2 (depends on Part-1)
  pgsql-v9.2-drop-reworks-2.v4.1.patch
* Part-3 (depends on Part-1 and -2)
  pgsql-v9.2-drop-reworks-3.v4.patch

Thanks,
-- 
KaiGai Kohei <kaigai(at)kaigai(dot)gr(dot)jp>

In response to

Responses

pgsql-hackers by date

Next:From: Thom BrownDate: 2011-10-10 17:39:20
Subject: Re: Range Types - typo + NULL string constructor
Previous:From: Kevin GrittnerDate: 2011-10-10 17:36:26
Subject: Re: COUNT(*) and index-only scans

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group