-----BEGIN PGP SIGNED MESSAGE-----
I'm working with a PHP-based application that is using PostgreSQL in
the background. One of the tables in the application has been used
for double-duty which is causing a problem. Unfortunately, I can't
readily change the way the table is being used....
One of the columns is defined as being varchar. But sometimes it
needs to hold an int4 value. So, I need to be able to convert from
int4 to varchar and back. The actual query is:
select members.id, members.element, slips.sid, slips.problem
from slips, members
where members.element = slips.sid::varchar
and members.id = 'quickslips'
which give an error in the ::varchar cast. It also gives an error
without the cast.
I couldn't find any functions in the online manuals that will allow me
to convert back and forth. Are there any?
This is with PostgreSQL 6.3.2.
-----BEGIN PGP SIGNATURE-----
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface
-----END PGP SIGNATURE-----
Roland B. Roberts, PhD Custom Software Solutions
roberts(at)panix(dot)com 101 West 15th St #4NN
New York, NY 10011
pgsql-general by date
|Next:||From: Dmitry Iv Popov||Date: 1998-11-27 22:52:22|
|Subject: PostgreSQL and WWW|
|Previous:||From: Patrick Verdon||Date: 1998-11-27 14:40:12|
|Subject: NOTICE: SIAssignBackendId: discarding tag 2147483647|