Hi, I tried installing this module (the 4.7 and the cvs versions) with drupal 4.7.2 and 4.7.3 running on PostgreSQL 8.0. I get the following error

  • pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "LIKE" at character 13 in /orangepics/shared_drive/intranet/drupal-4.7.3/includes/database.pgsql.inc on line 84.
  • query: CREATE TABLE IF NOT EXISTS reptag_storage ( nid integer NOT NULL default '0', vid integer NOT NULL default '0', body text NOT NULL default '', teaser text NOT NULL default '', PRIMARY KEY (vid)); in /orangepics/shared_drive/intranet/drupal-4.7.3/includes/database.pgsql.inc on line 103.

Postgres didn't like the "IF NOT EXISTS" in the create table statement, so I ran it manually without that option. However when I go to create a tag I get this error:

  • pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "LIKE" at character 13 in /orangepics/shared_drive/intranet/drupal-4.7.3/includes/database.pgsql.inc on line 84.
  • query: SHOW TABLES LIKE '%reptag_vars' in /orangepics/shared_drive/intranet/drupal-4.7.3/includes/database.pgsql.inc on line 103.
  • Postgres doesn't seem to like the "SHOW TABLES LIKE" command.

    Has anyone used this module with postgres? It looks like a really teriffic module, something I'd love to get working.

Comments

profix898’s picture

Priority: Normal » Critical

I guess nobody ever tried to use reptag with PostgreSQL! At least I never did and all people I heard from are using MySQL.

When I first released reptag for 4.7 the tables were optional and a table-exist check was needed. However I think it is save to remove it now. Its the only database-specific code in reptag. I will make some changes, remove 'IF NOT EXISTS' from .install and commit an updated version tomorrow.

I will see how to get PostgreSQL run on my system to make some testing ...

redsky’s picture

cool thanks, let me know if there's anything I can do to help. Also, note that postgres didn't like the "SHOW TABLES LIKE" command.

In the mean time I just hacked the _reptag_table_exists() function to always return true :P The module works great!

profix898’s picture

Last night I updated cvs version of reptag. As you said hacking _reptag_table_exists() was all you needed, it should work nicely. Can you please try that one!?

I couldnt get PostgreSQL running on Windows (installer always crashes half the way :( ), but I will try on my Linux box.

redsky’s picture

On a fresh drupal I get the same messages. It doesn't look like PostgreSQL supports the "IF NOT EXISTS" clause: http://www.postgresql.org/docs/8.1/interactive/sql-createtable.html

  • warning: pg_query() [function.pg-query]: Query failed: ERROR: syntax error at or near "NOT" at character 17 in /orangepics/drupal/drupal-4.7.3/includes/database.pgsql.inc on line 84.
  • user warning: query: CREATE TABLE IF NOT EXISTS reptag_vars ( name varchar(255) NOT NULL default '', value text, uid integer NOT NULL default '0'); in /orangepics/drupal/drupal-4.7.3/includes/database.pgsql.inc on line 103.
profix898’s picture

Which version did you try? 4.7 or cvs? In cvs I removed all 'IF NOT EXISTS' for postgre and the _reptag_table_exists().

profix898’s picture

Trying to install Drupal using PostgreSQL I get the following error:
Your PostgreSQL Server is too old. Drupal requires at least PostgreSQL 7.3. (Currently using PostgreSQL database )'
But the version string of my PostgreSQL server is 'postgres (PostgreSQL) 8.1.4'.
Any ideas?

redsky’s picture

Okay the version in CVS works!! I swear that was the version I already tried. Oh well, it was late that night, I must have made a mistake. I tried it with a drupal install running postgresql 8.0 that had never had this module installed before. There were no errors and it works. Thank you very much for your quick attention on this.

Oh, I poked around looking for any info on your version problem and found nothing. Sorry.

profix898’s picture

Status: Active » Fixed

Nice to hear it works for you now :)

Anonymous’s picture

Status: Fixed » Closed (fixed)