Results 1 to 2 of 2
Hi all
I created an RPM (through a SPEC file I specified) that's supposed to perform database operations. One of those operations (on uninstall) is the following:
Code:
%postun
echo ...
- 03-11-2010 #1Just Joined!
- Join Date
- Dec 2006
- Posts
- 5
[SOLVED] syntax error near unexpected token `(' while installing RPM than runs psql c
Hi all
I created an RPM (through a SPEC file I specified) that's supposed to perform database operations. One of those operations (on uninstall) is the following:
If I execute the command above directly in the shell it works fine. However, when I run the RPM uninstall I get an error:Code:%postun echo "Deleting items from database..." psql HARDWARE_DB postgres -c "delete from maintable where id in (select item_id from items where item_name ='TABLE') ;"
syntax error near unexpected token `('
I tried to escape the "(", by using backslash. Then it complained the same thing about ")", so I also escaped it using "\)":
But then, I got a new error (even though all double quotes have the matching pair):Code:%postun echo "Deleting items from database..." psql HARDWARE_DB postgres -c "delete from maintable where id in \(select item_id from items where item_name ='TABLE'\) ;"
Unexpected EOF while looking for matching `"'
Any ideas?
Thanks in advance
- 03-12-2010 #2Just Joined!
- Join Date
- Dec 2006
- Posts
- 5
Oops.....
There was a (dumb...) error indeed but on a previous line. I was escaping a double quote and I had "\ instead of \" ...
So there's no need to escape the "(" nor ")" . The error was just that one (should have slept a few more hours before posting this...)


