Thread: super question???

super question???

From
Frank_Lupo Frank_Lupo
Date:
Buon Giorno !!

========================= ==================
select 'aaa'+'aaa';
return :
?column?
----------
?
????????????
select textcat('aaa','aaa');
textcat
---------
aaaaaa
========================= ==================
I have a table which two columns (cod,des) are varchar.

When select :
select cod+des from .....
error

I creata function and operator +:
CREATE FUNCTION "varcharcat"("varchar", "varchar") RETURNS "text" AS 'select textcat($1,$2)' LANGUAGE 'sql';
COMMENT ON FUNCTION "varcharcat"("varchar", "varchar") IS 'concatenate';

CREATE OPERATOR + (PROCEDURE = "varcharcat", LEFTARG = "varchar", RIGHTARG = "varchar");

The resul is ok but :
select 'aaa'+'aaa';
ERROR: Unable to identify an operator '+' for types 'unknown' and 'unknown'
You will have to retype this query using an explicit cast
ERROR: Unable to identify an operator '+' for types 'unknown' and 'unknown'
You will have to retype this query using an explicit cast
========================= ==================
I work in win2000. The setting are:
- language italian;
- time/zone Rome (GMT + 1.00 h)

In postgresql the set are:
PGDATESTYLE="European"
PGTZ="Europe/Rome"

Time win2000 8:26

template1=# select current_time;
timetz
--------------------
07:26:33.518169+00
?????????????????????????????????

Because the time/zone are not equal?

========================= ==================
Problem in insert

CREATE TABLE "irelbcmb" (
  "id" int4,
  "id_pad" int4,
  "desc" int4,
  "cod" varchar(40),
  "sys_var" varchar(1),
  "nom_var" varchar(16)
) WITH OIDS;

gedis30=# insert into irelbcmb (id,id_pad,desc,cod,sys_var,nom_var) values 1,1,1,"pippo","1","pippo");
ERROR:  parser: parse error at or near "desc"

========================= ==================
Tanks

--
Frank Lupo (Wolf) !!
------------------------------------------------------------------------
Questo messaggio e' stato inviato con Telemail http://www.telemail.it ,
    La freemail per la comunicazione unificata gratuita