pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
type conversions
3+ messages / 3 participants
[nested] [flat]

* type conversions
@ 1999-11-05 10:10 Baris Ulu <ulu@bornova.ege.edu.tr>
  1999-11-08 04:16 ` Re: [SQL] type conversions De Moudt Walter <wdemoudt@planetinternet.be>
  0 siblings, 1 reply; 3+ messages in thread

From: Baris Ulu @ 1999-11-05 10:10 UTC (permalink / raw)
  To: pgsql-sql

	I created a function that returns a character which is
concatanated with four or five different attributes, but one of them is
float8 that indicates a ratio; but I hava not found a function that
converts a floating point number to a text or char data type.  What can I
do with it(Itried to convert it as in the following 'text(int(ratio))' but
it gives the rounded integer value of my ratio as usual...)




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: [SQL] type conversions
  1999-11-05 10:10 type conversions Baris Ulu <ulu@bornova.ege.edu.tr>
@ 1999-11-08 04:16 ` De Moudt Walter <wdemoudt@planetinternet.be>
  0 siblings, 0 replies; 3+ messages in thread

From: De Moudt Walter @ 1999-11-08 04:16 UTC (permalink / raw)
  To: pgsql-sql; +Cc: Baris Ulu <ulu@bornova.ege.edu.tr>

Hi Baris,
Think i found something for you. In pg_proc (a table you can and querry
in any postgres database - try "select * from pg_proc) i found the
following :

float4_text accepts float4 returns text
float8_text	float8		text
int2_text	int2		text
int4_text	int4		text
int8_text	int8		text
text_float4	text		float4
text_float8	text		float8
text_int2......
     .
     .
I think all these functions work with the argument between brackets ()
as any function in (almost) any language, but haven't tested them yet
though.

If You run into problems with fonctions or procedures, you should look
at this table, as well as at the pg_operator table. They are very
instructive, and speak for themselves, with some assumptions :-)

Hope it helps,

regards from Walter De Moudt
(sorry for the sloppy layout, had a drink tonight :-s)

Baris Ulu wrote:
> 
>         I created a function that returns a character which is
> concatanated with four or five different attributes, but one of them is
> float8 that indicates a ratio; but I hava not found a function that
> converts a floating point number to a text or char data type.  What can I
> do with it(Itried to convert it as in the following 'text(int(ratio))' but
> it gives the rounded integer value of my ratio as usual...)
> 
> ************



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* type conversions
@ 2004-04-15 04:04 sad <sad@bankir.ru>
  0 siblings, 0 replies; 3+ messages in thread

From: sad @ 2004-04-15 04:04 UTC (permalink / raw)
  To: pgsql-sql

hi

SELECT 'tbl'::regclass;
works fine

SELECT 'tbl'::text::regclass;
says cannot convert type text to regclass

what to do ?




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-04-15 04:04 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-11-05 10:10 type conversions Baris Ulu <ulu@bornova.ege.edu.tr>
1999-11-08 04:16 ` De Moudt Walter <wdemoudt@planetinternet.be>
2004-04-15 04:04 type conversions sad <sad@bankir.ru>

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