Unix Technical Forum

Upgrade 8.3

This is a discussion on Upgrade 8.3 within the Pgsql General forums, part of the PostgreSQL category; --> I am running the following query update tempportfwdconnectiona set srcid=interface.objectid from interface where tempportfwdconnectiona.hostid=interface.host and tempportfwdconnectiona.spantreeport=interface.stpp ort For application ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > Pgsql General

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 07:20 AM
E.J. Moloney
 
Posts: n/a
Default Upgrade 8.3

I am running the following query

update tempportfwdconnectiona set srcid=interface.objectid from
interface where tempportfwdconnectiona.hostid=interface.host and
tempportfwdconnectiona.spantreeport=interface.stpp ort

For application reasons the spantreeport in one table is a text field
and an integer in the other.

I am getting a cast error when I run this query which did work 8.2x, I
can't make both fields the same type is there any work around any body
can suggest.

I tried creating a cast but the interface function text_int no longer
exists.


Regards
E.J. Moloney


--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-19-2008, 07:20 AM
Craig Ringer
 
Posts: n/a
Default Re: Upgrade 8.3

E.J. Moloney wrote:
> I am running the following query
>
> update tempportfwdconnectiona set srcid=interface.objectid from
> interface where tempportfwdconnectiona.hostid=interface.host and
> tempportfwdconnectiona.spantreeport=interface.stpp ort
>
> For application reasons the spantreeport in one table is a text field
> and an integer in the other.
>
> I am getting a cast error when I run this query which did work 8.2x, I
> can't make both fields the same type is there any work around any body
> can suggest.


http://www.postgresql.org/docs/8.3/i....html#AEN85822

Try using an explicit cast, like CAST(spantreeport AS text) OR
CAST(spantreeport AS integer) .

--
Craig Ringer

--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:20 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com