public inbox for [email protected]
help / color / mirror / Atom feedMigration issue
2+ messages / 2 participants
[nested] [flat]
* Migration issue
@ 2008-03-02 23:18 Terminal Station <[email protected]>
2008-03-03 00:26 ` Re: Migration issue Selena Deckelmann <[email protected]>
0 siblings, 1 reply; 2+ messages in thread
From: Terminal Station @ 2008-03-02 23:18 UTC (permalink / raw)
To: pgsql-www
Url : http://pugs.postgresql.org/directory
Error Msg:
"
* warning: pg_query() [function.pg-query]: Query failed: ERROR:
function left(character varying, integer) does not exist LINE 1:
SELECT count(DISTINCT(LEFT(term_data.name, 1))) FROM node no... ^
HINT: No function matches the given name and argument types. You may
need to add explicit type casts. in
/usr/local/www/drupal5/includes/database.pgsql.inc on line 125.
* user warning: query: SELECT count(DISTINCT(LEFT(term_data.name,
1))) FROM node node LEFT JOIN term_node term_node ON node.nid =
term_node.nid LEFT JOIN term_data term_data ON term_node.tid =
term_data.tid WHERE (node.status = '1') AND (term_data.name IS NOT
NULL) in /usr/local/www/drupal5/includes/database.pgsql.inc on line
144.
* warning: pg_query() [function.pg-query]: Query failed: ERROR:
function left(character varying, integer) does not exist LINE 1:
SELECT term_data.tid, LEFT(term_data.name, 1) AS letter, cou... ^
HINT: No function matches the given name and argument types. You may
need to add explicit type casts. in
/usr/local/www/drupal5/includes/database.pgsql.inc on line 125.
* user warning: query: SELECT term_data.tid, LEFT(term_data.name,
1) AS letter, count(node.nid) AS num_nodes, term_data.weight AS
term_data_weight, term_data.name AS term_data_name, node.sticky AS
node_sticky, node.created AS node_created_created FROM node node LEFT
JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN
term_data term_data ON term_node.tid = term_data.tid WHERE
(node.status = '1') AND (term_data.name IS NOT NULL) GROUP BY
LEFT(term_data.name, 1), term_data_weight, term_data_name,
node_sticky, node_created_created ORDER BY term_data_weight ASC,
term_data_name ASC, node_sticky DESC, node_created_created DESC LIMIT
50 OFFSET 0 in /usr/local/www/drupal5/includes/database.pgsql.inc on
line 144.
"
Cause:
Automatic casting not supported!
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Migration issue
2008-03-02 23:18 Migration issue Terminal Station <[email protected]>
@ 2008-03-03 00:26 ` Selena Deckelmann <[email protected]>
0 siblings, 0 replies; 2+ messages in thread
From: Selena Deckelmann @ 2008-03-03 00:26 UTC (permalink / raw)
To: Terminal Station <[email protected]>; +Cc: pgsql-www
On Sun, Mar 2, 2008 at 3:18 PM, Terminal Station <[email protected]> wrote:
> Url : http://pugs.postgresql.org/directory
> * warning: pg_query() [function.pg-query]: Query failed: ERROR:
> function left(character varying, integer) does not exist LINE 1:
> SELECT count(DISTINCT(LEFT(term_data.name, 1))) FROM node no... ^
> HINT: No function matches the given name and argument types. You may
> need to add explicit type casts. in
> /usr/local/www/drupal5/includes/database.pgsql.inc on line 125.
[trimmed]
This is not a casting problem.
The problem is the LEFT() function call. This is a mysql-specific
function that returns the left-most characters. I fixed it by creating
a function that just uses SUBSTR() instead.
But there's another bug :(
And, I fixed it. There was a missing column in a GROUP BY.
-selena
--
Selena Deckelmann
PDXPUG - Portland PostgreSQL Users Group
http://pugs.postgresql.org/pdx
http://www.chesnok.com/daily
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2008-03-03 00:26 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-03-02 23:18 Migration issue Terminal Station <[email protected]>
2008-03-03 00:26 ` Selena Deckelmann <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox