pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
newbie question about type conversions
2+ messages / 1 participants
[nested] [flat]

* newbie question about type conversions
@ 1999-03-26 21:13  Andrew Douglas <douglasa@bellsouth.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Douglas @ 1999-03-26 21:13 UTC (permalink / raw)
  To: pgsql-sql

I can't seem to figure out how to convert a varchar to a text or a text to char or anything. I've tried doing exactly as the good documentation says but this is the kind of response I get...

foo=> select orgname from organization;
orgname
----------------------
Douglas Ventures
Progressive Consulting
(2 rows)
 
foo=> \d organization;
 
<---SNIP--->
| orgname   | varchar() not null   |    25 |
<---SNIP--->

foo=> select text(orgname) from organization;
ERROR:  function text(varchar) does not exist
foo=> select orgname::text from organization;
ERROR:  function text(varchar) does not exist
foo=> select char(orgname) from organization;
ERROR:  parser: parse error at or near "orgname"
foo=> select orgname::char from organization;
ERROR:  function char(varchar) does not exist

any suggestions?

<Note: Linux Redhat 5.2 postgreSQL 6.3.2
-Andrew
adouglas@bellsouth.net



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* newbie question about type conversions
@ 1999-03-26 21:42  Andrew Douglas <douglasa@bellsouth.net>
  0 siblings, 0 replies; 2+ messages in thread

From: Andrew Douglas @ 1999-03-26 21:42 UTC (permalink / raw)
  To: pgsql-sql

I can't seem to figure out how to convert a varchar to a text or a text to char
or anything. I've tried doing exactly as the good documentation says but this is
the kind of response I get..

foo=> select orgname from organization;
orgname
----------------------
Douglas Ventures
BobMart
(2 rows)
 
foo=> \d organization;
 
<---SNIP--->
| orgname   | varchar() not null   |    25 |
<---SNIP--->

foo=> select text(orgname) from organization;
ERROR:  function text(varchar) does not exist
foo=> select orgname::text from organization;
ERROR:  function text(varchar) does not exist
foo=> select char(orgname) from organization;
ERROR:  parser: parse error at or near "orgname"
foo=> select orgname::char from organization;
ERROR:  function char(varchar) does not exist

any suggestions?

< Note: Redhat Linux 5.2 postgreSQL 6.3.2 >
-Andrew
adouglas@bellsouth.net





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-03-26 21:42 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-03-26 21:13 newbie question about type conversions Andrew Douglas <douglasa@bellsouth.net>
1999-03-26 21:42 newbie question about type conversions Andrew Douglas <douglasa@bellsouth.net>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox