Re: Implicit conversion bugaboo in beta2?
От | Josh Berkus |
---|---|
Тема | Re: Implicit conversion bugaboo in beta2? |
Дата | |
Msg-id | 200309142223.37824.josh@agliodbs.com обсуждение исходный текст |
Ответ на | Re: Implicit conversion bugaboo in beta2? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Implicit conversion bugaboo in beta2?
|
Список | pgsql-bugs |
Tom, > regression=# select lpad('xyz'::varchar, 4::int8); > ERROR: Function lpad(character varying, bigint) does not exist > Unable to identify a function that satisfies the given argument > types You may need to add explicit typecasts Oops! Sorry. The problem is there, it's just something different than I orginally thought; the issue is the BIGINT. What confuses me is how the bigint got there; it's from this view: CREATE VIEW vw_teams AS SELECT teams_desc.team_id, team_name, team_code, notes, MIN(teams_tree.treeno) as lnode, MAX(teams_tree.treeno) as rnode, parent.team_id as parent_id, COUNT(*)/2 as tlevel FROM teams_desc JOIN teams_tree USING (team_id) JOIN teams_tree parent ON parent.treeno < teams_tree.treeno JOIN teams_tree parents ON parents.treeno < teams_tree.treeno WHERE parent.treeno = (SELECT max(p1.treeno) FROM teams_tree p1 WHERE p1.treeno < teams_tree.treeno AND EXISTS (select treeno from teams_tree p2 where p2.treeno > teams_tree.treeno and p2.team_id = p1.team_id)) AND EXISTS (select parents2.team_id from teams_tree parents2 where parents2.treeno > teams_tree.treeno AND parents2.team_id = parents.team_id) GROUP BY teams_desc.team_id, team_name, team_code, notes, parent.team_id; In 7.4 beta2, the "tlevel" column comes out as BIGINT, not INT as it certainly did in 7.2.4 and I think it did in 7.3.4. Are we now defaulting COUNT(*) to BIGINT? IF so, that's going to be a *huge* backwards compatibility warning for people .... -- Josh Berkus Aglio Database Solutions San Francisco
В списке pgsql-bugs по дате отправления: