This useful module doesn't seem to work with PostgreSQL databases.

When i try the filter, i obtain this error:

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "/example.org/test/page" LINE 1: SELECT * FROM gotwo WHERE src = gid+'/example.org/test/page'... ^: SELECT * FROM {gotwo} WHERE src = gid+:src AND dst = :dst; Array ( [:src] => /example.org/test/page [:dst] => http://example.org/test/page ) in _gotwo_get() (line 339 of /usr/local/drupal/sites/all/modules/gotwo/gotwo.module).

Comments

Jibus’s picture

I spend time to understand why this request is required but i can't figure out. Before triggering this request, there is a first wich verify if the alias already exist.

Still working on this ...

hass’s picture

Priority: Critical » Normal

Do you know the equivalent of this SQL statement for PG?

Jibus’s picture

At this time no

Can you explain what this statement do ?

This part cause a problem for Postgre: WHERE src = gid+:src

gid+:src

Andre-B’s picture

Issue summary: View changes

related: #2207685: Bugged link discovery in _gotwo_do_redir() once that get's commited one could probably switch the db_select to something compatible to postgresql

rmcom’s picture

Giving this a bump.

Still the same issue:

PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "/page" LINE 1: SELECT * FROM gotwo WHERE src = gid+'/page' AND dst =... ^: SELECT * FROM {gotwo} WHERE src = gid+:src AND dst = :dst; Array ( [:src] => /page [:dst] => http://pagesite.com ) in _gotwo_get() (line 339 of /var/www/html/sites/all/modules/gotwo/gotwo.module).