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 datatype conversion
Date: Mon, 29 Mar 1999 08:47:04 -0500
Message-ID: <199903291315.IAA25920@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
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

I must be doing something really silly but I just don't see it. Any suggestions? TIA

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



Message-ID: <199903291315.IAA25920@websmtp1.bellsouth.bigfoot.com>
Permalink:  ../199903291315.IAA25920@websmtp1.bellsouth.bigfoot.com/
Also on:    postgresql.org/message-id/199903291315.IAA25920@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 datatype conversion
  In-Reply-To: <199903291315.IAA25920@websmtp1.bellsouth.bigfoot.com>
  References: <199903291315.IAA25920@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