pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Douglas <douglasa@bellsouth.net>
To: pgsql-sql@postgresql.org
Subject: newbie question about type conversions
Date: Fri, 26 Mar 1999 16:13:15 -0500
Message-ID: <199903262042.PAA01984@websmtp1.bellsouth.bigfoot.com> (raw)

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



view thread (2+ messages)  latest in thread

Message-ID: <199903262042.PAA01984@websmtp1.bellsouth.bigfoot.com>
Permalink:  ../199903262042.PAA01984@websmtp1.bellsouth.bigfoot.com/
Also on:    postgresql.org/message-id/199903262042.PAA01984@websmtp1.bellsouth.bigfoot.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: douglasa@bellsouth.net
  Subject: Re: newbie question about type conversions
  In-Reply-To: <199903262042.PAA01984@websmtp1.bellsouth.bigfoot.com>
  References: <199903262042.PAA01984@websmtp1.bellsouth.bigfoot.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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