Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Error is PostgreSQL...

Quote Reply
Error is PostgreSQL...
I get errors when creating and deleting columns. When trying to delete a new column I had just made (because is errored upon creation) I receive this error:

Failed to execute query: 'ALTER TABLE yak_Category DROP ShowCounts' Reason: ERROR: parser: parse error at or near ""


Is this something to do with my configuration, or does Links SQL have issues with PostgreSQL?

Sean
Quote Reply
Re: [SeanP] Error is PostgreSQL... In reply to
hmm... doing a quick search on google, I found this page: http://www.us.postgresql.org/.../sql-altertable.html
It looks like Postgres 7 doesn't support ALTER TABLE with a DROP.
Quote:
ALTER TABLE table DROP [ COLUMN ] column { RESTRICT | CASCADE }

Removes a column from a table. Currently, to remove an existing column the table must be recreated and reloaded:

CREATE TABLE temp AS SELECT did, city FROM distributors;
DROP TABLE distributors;
CREATE TABLE distributors (
did DECIMAL(3) DEFAULT 1,
name VARCHAR(40) NOT NULL
);
INSERT INTO distributors SELECT * FROM temp;
DROP TABLE temp;

I'll let Alex know and see if he can make the necessary changes to GT::SQL.

Adrian
Quote Reply
Re: [brewt] Error is PostgreSQL... In reply to
Those were the only two errors I found (adding and removing a column), but I only ran it for about a day. I switched back to MySQL. When I was using Postgres, the indexing was extremely slow (may have been my settings). I have a very large database, and I thought Postgres was going to be much faster because it is a fully relational database as opposed to MySQL. Oh well...

Sean