| From: | sferac(at)bo(dot)nettuno(dot)it |
|---|---|
| To: | Brett McCormick <brett(at)work(dot)chicken(dot)org> |
| Cc: | pgsql-hackers(at)hub(dot)org |
| Subject: | Re: [HACKERS] casting & type comments |
| Date: | 1998-03-13 17:57:33 |
| Message-ID: | Pine.LNX.3.96.980313174244.1783N-100000@nero |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Thu, 12 Mar 1998, Brett McCormick wrote:
>
> What do you all think about the fact that cast(anytype as varchar)
> results in a call to a procedure that is not creatable with 'create
> function'? Perhaps we should re-think our casting implementation,
> maybe one that isn't based on just rewriting itself into a function
> call :) If I wanted to call a function, I would :)
>
> I can, however, do a create function with a different name, then
> update that to varchar. the reason I can't, of course, is because the
> grammar expects varchar(number), not varchar(argument types)..
>
> there was probably a much better way of saying all that :)
>
I agree with you.
Many databases as SOLID and MySQL don't have CAST statement because they
don't need it.
Unfortunately we need a CAST statement to convert data from one to another
type but it is incomplete, seems that CAST can translate only a few types
like:
int to float
float to int
int to text
float to text
We can't CAST a char to a varchar, for example.
It would be interesting al least to have a list of possible conversions.
Ciao, Jose'
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Hannu Krosing | 1998-03-13 18:43:11 | Re: PL/PgSQL discussion |
| Previous Message | Jan Wieck | 1998-03-13 17:50:23 | Re: PL/PgSQL discussion |