From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-bugs(at)postgresql(dot)org |
Subject: | Re: Implicit conversion bugaboo in beta2? |
Date: | 2003-09-15 05:23:37 |
Message-ID: | 200309142223.37824.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-09-15 05:34:51 | Re: Implicit conversion bugaboo in beta2? |
Previous Message | Tom Lane | 2003-09-15 05:08:36 | Re: Implicit conversion bugaboo in beta2? |