Why not using text-function substring:
SELECT split_part(123.456::text,'.',1)::integer;
SELECT split_part(123.456::text,'.',2)::integer;
Regards,
Andreas
-Ursprüngliche Nachricht-
Von: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org] Im
Auftrag von Petru Ghita
Gese
In response to Andreas Gaab :
> I tried successfully to directly insert a further entry into table
> pg_enum with the corresponding enumtypid. Do you think to directly
> manipulate table pg_enum is allowed?
It's maybe allowed, but not recommended. It's a system-table, not a
user-table.
Andreas
-
Here's a thought
create table test1(col1 decimal(7,1));
insert into test1
values(77.1),(77.2),(134.1),(134.2),(134.3),(5.1),(5.2)
select col1::integer from test1;
select substr((col1-col1::integer),3) from test1;
doug
From: pgsql-sql-ow...@postgresql.org [mailto:pgsql-sql-ow...@postgresql.org