Re: Command Triggers, patch v11 - Mailing list pgsql-hackers

From Thom Brown
Subject Re: Command Triggers, patch v11
Date
Msg-id CAA-aLv5iSnOJeeMGjh9+4NCdO8GthrkzHuRv9HSBzOrmdHbZ4A@mail.gmail.com
Whole thread Raw
In response to Re: Command Triggers, patch v11  (Thom Brown <thom@linux.com>)
Responses Re: Command Triggers, patch v11  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
List pgsql-hackers
On 3 March 2012 00:08, Thom Brown <thom@linux.com> wrote:
> On 2 March 2012 23:33, Thom Brown <thom@linux.com> wrote:
>> On 2 March 2012 22:32, Dimitri Fontaine <dimitri@2ndquadrant.fr> wrote:
>>>>> test=# CREATE TABLE badname (id int, a int, b text);
>>>>> ERROR:  invalid relation name: badname
>>>>> test=# CREATE TABLE badname AS SELECT 1::int id, 1::int a, ''::text b;
>>>>> SELECT 1
>>>>>
>>>>> This doesn't even get picked up by ANY COMMAND.
>>>
>>> I think Andres should add an entry for his patch on the commitfest.  Is
>>> it ok?
>>
>> I'll try Andres' patch this weekend while I test yours.
>
> Actually no matter which patch I apply first, they cause the other to
> fail to apply.

And having tried building it, it appears to fail.

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -g -I../../../src/include
-D_GNU_SOURCE -I/usr/include/libxml2   -c -o alter.o alter.c -MMD -MP
-MF .deps/alter.Po
alter.c: In function ‘ExecRenameStmt’:
alter.c:69:4: warning: passing argument 1 of ‘RenameCmdTrigger’ from
incompatible pointer type [enabled by default]
../../../src/include/commands/cmdtrigger.h:45:13: note: expected
‘const char *’ but argument is of type ‘struct List *’
alter.c:69:4: error: too many arguments to function ‘RenameCmdTrigger’
../../../src/include/commands/cmdtrigger.h:45:13: note: declared here

You've changed the signature of RenameCmdTrigger but still pass in the
old arguments in alter.c.  If I fix this locally, I then get:

gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement -Wendif-labels
-Wmissing-format-attribute -Wformat-security -fno-strict-aliasing
-fwrapv -fexcess-precision=standard -g -I../../../src/include
-D_GNU_SOURCE -I/usr/include/libxml2   -c -o copyfuncs.o copyfuncs.c
-MMD -MP -MF .deps/copyfuncs.Po
copyfuncs.c: In function ‘_copyAlterCmdTrigStmt’:
copyfuncs.c:3479:2: error: ‘AlterCmdTrigStmt’ has no member named ‘command’
copyfuncs.c:3479:2: error: ‘AlterCmdTrigStmt’ has no member named ‘command’
copyfuncs.c:3479:2: error: ‘AlterCmdTrigStmt’ has no member named ‘command’

There's an erroneous "COPY_STRING_FIELD(command)" in there, as well as
in equalfuncs.c.  After removing both those instances it builds.

Are you sure you don't have any uncommitted changes?

--
Thom


pgsql-hackers by date:

Previous
From: "anarazel@anarazel.de"
Date:
Subject: Re: Command Triggers, patch v11
Next
From: Alvaro Herrera
Date:
Subject: Re: review: CHECK FUNCTION statement