Received: from ece.rice.edu (ece.rice.edu [128.42.4.34]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9G0YcP85965 for ; Mon, 15 Oct 2001 20:34:53 -0400 (EDT) (envelope-from reedstrm@rice.edu) Received: from localhost (localhost [127.0.0.1]) by ece.rice.edu (Postfix) with ESMTP id C7D5B68A14 for ; Mon, 15 Oct 2001 19:34:17 -0500 (CDT) Received: from wallace.ece.rice.edu (wallace.ece.rice.edu [128.42.12.154]) by ece.rice.edu (Postfix) with ESMTP id 1E35468A0E for ; Mon, 15 Oct 2001 19:34:17 -0500 (CDT) Received: from reedstrm by wallace.ece.rice.edu with local (Exim 3.22 #1 (Debian)) id 15tIBU-0001Na-00 for ; Mon, 15 Oct 2001 19:34:16 -0500 Date: Mon, 15 Oct 2001 19:34:16 -0500 From: "Ross J. Reedstrom" To: pgsql-sql@postgresql.org Subject: Re: to_char()?? Message-ID: <20011015193416.A5256@rice.edu> Mail-Followup-To: "Ross J. Reedstrom" , pgsql-sql@postgresql.org References: <9qb2lj$13lv$1@news.tht.net> <9qd0j0$1gc3$1@news.tht.net> <9qdfnh$1jte$1@news.tht.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9qdfnh$1jte$1@news.tht.net> User-Agent: Mutt/1.3.18i X-Virus-Scanned: by AMaViS snapshot-20010714 X-Archive-Number: 200110/201 X-Sequence-Number: 5156 On Mon, Oct 15, 2001 at 09:56:26AM +0800, guard wrote: > thanks > > I have run "select substr('hi there', 3, 5)::varchar(5) as xx;" > but get error message > Error: ERROR: parser: parse error at or near ":" Upgrade your version of PostgreSQL: test=# select substr('hi there', 3, 5)::varchar(5) as xx; xx ------- ther (1 row) test=# select version(); version --------------------------------------------------------------- PostgreSQL 7.1.2 on i686-pc-linux-gnu, compiled by GCC 2.95.4 (1 row) test=# Ross -- Ross Reedstrom, Ph.D. reedstrm@rice.edu Executive Director phone: 713-348-6166 Gulf Coast Consortium for Bioinformatics fax: 713-348-6182 Rice University MS-39 Houston, TX 77005