pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedsorry... ;^)
4+ messages / 4 participants
[nested] [flat]
* sorry... ;^)
@ 1998-09-10 08:45 Thierry VERMAT <tvermat@mailcity.com>
0 siblings, 0 replies; 4+ messages in thread
From: Thierry VERMAT @ 1998-09-10 08:45 UTC (permalink / raw)
To: pgsql-sql
Hi !
I'm sorry to disturb everybody with this, but I would like to unsubscribe to this ML (psql-sql), and I lost the way to do it...
Could someone help me ?
Thanx
Thierry
Now MailCity offers forwarding so you can check your MailCity messages and other e-mail all in one place. Go to http://www.mailcity.com
^ permalink raw reply [nested|flat] 4+ messages in thread
* Sorry..
@ 2002-07-15 03:17 Christopher Kings-Lynne <chriskl@familyhealth.com.au>
0 siblings, 1 reply; 4+ messages in thread
From: Christopher Kings-Lynne @ 2002-07-15 03:17 UTC (permalink / raw)
To: pgsql-sql
Ignore previous half-completed email.
How do you get this to work in 7.2.1?
I'm creating a view of a table, but I'm trying to do something like
this:
create table t (
id integer not null,
amount numeric(7,2)
);
create view v as
select id as v_id,
'paid amount: ' || amount as v_comment
from t
;
You get this:
ERROR: Unable to identify an operator '||' for types 'unknown' and
'numeric'
You will have to retype this query using an explicit cast
None of these work:
CAST(amount AS text)
CAST(amount AS varchar)
CAST(amount AS char)
and this:
CAST(amount AS real) works, but if amount is 12.00, then you just get '12' -
which is not cool.
Any ideas?
Chris
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Sorry..
@ 2002-07-15 03:27 Tom Lane <tgl@sss.pgh.pa.us>
parent: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
0 siblings, 1 reply; 4+ messages in thread
From: Tom Lane @ 2002-07-15 03:27 UTC (permalink / raw)
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: pgsql-sql
"Christopher Kings-Lynne" <chriskl@familyhealth.com.au> writes:
> [ there's no cast from numeric to text ]
Feel free to contribute one.
In the bad old days when we couldn't distinguish explicit from implicit
cast functions, I was wary of adding new cast pathways. Too many
implicit casts and you have no type system at all. But in 7.3 there
should be no reason to object to an explicit-only cast from numeric
to text or vice versa.
regards, tom lane
^ permalink raw reply [nested|flat] 4+ messages in thread
* Re: Sorry..
@ 2002-07-15 21:01 Josh Berkus <josh@agliodbs.com>
parent: Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 4+ messages in thread
From: Josh Berkus @ 2002-07-15 21:01 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Christopher Kings-Lynne <chriskl@familyhealth.com.au>; +Cc: pgsql-sql
Christopher,
> In the bad old days when we couldn't distinguish explicit from implicit
> cast functions, I was wary of adding new cast pathways. Too many
> implicit casts and you have no type system at all. But in 7.3 there
> should be no reason to object to an explicit-only cast from numeric
> to text or vice versa.
I'd suggest making the explicit cast of numeric to text be the exact
equivalent of:
SELECT btrim(to_char(numeric, '999,999,999,999.9999999999'))
or similar.
--
-Josh Berkus
Aglio Database Solutions
San Francisco
^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2002-07-15 21:01 UTC | newest]
Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1998-09-10 08:45 sorry... ;^) Thierry VERMAT <tvermat@mailcity.com>
2002-07-15 03:17 Sorry.. Christopher Kings-Lynne <chriskl@familyhealth.com.au>
2002-07-15 03:27 ` Re: Sorry.. Tom Lane <tgl@sss.pgh.pa.us>
2002-07-15 21:01 ` Re: Sorry.. Josh Berkus <josh@agliodbs.com>
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