From: | Borek Lupoměský <borekl(at)volny(dot)cz> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Francis Solomon <francis(at)stellison(dot)co(dot)uk>, pgsql-sql(at)postgresql(dot)org |
Subject: | Re: SQL parse error |
Date: | 2000-12-13 13:59:32 |
Message-ID: | Pine.LNX.4.21.0012131453290.28688-100000@diaspar.ujep.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tue, 12 Dec 2000, Tom Lane wrote:
TL> play=> create table out2cp(cp varchar(6));
TL> CREATE
TL> play=> insert into out2cp values('3182.1');
TL> INSERT 405833 1
TL> play=> insert into out2cp values('3182.2');
TL> INSERT 405834 1
TL> play=> select substring(cp from 1 for 4)::int4 from out2cp;
TL> ?column?
TL> ----------
TL> 3182
TL> 3182
TL> (2 rows)
When I do this, it works for me, too. But when I do it on my current
database, something breaks. The table I work on is:
swports=# \d out2cp
Table "out2cp"
Attribute | Type | Modifier
-----------+-------------+----------
cp | varchar(10) |
outlet | varchar(10) |
location | varchar(32) |
Index: o2c_cp
Values in cp field look like this:
swports=# select cp from out2cp ;
cp
---------
3182.4
3182.7
3182.2
3182.5
3182.6
3182.8
3169.1
3169.3
3169.4
3169.7
3165.1
Bye Borek
--
=====================================================================
BOREK LUPOMESKY Usti nad Labem, Czech Republic, Europe
WWW: http://www.volny.cz/borekl/ PGP keyid: B6A06AEB
==========[ MIME/ISO-8859-2 & PGP encrypted mail welcome ]===========
From | Date | Subject | |
---|---|---|---|
Next Message | Roberto Mello | 2000-12-13 15:15:00 | Re: Postgres closing the connection too fast with php4+apache |
Previous Message | Francis Solomon | 2000-12-13 13:45:30 | RE: Date Format |