From: | Frank_Lupo Frank_Lupo <frank_lupo(at)telemail(dot)it> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | super question??? |
Date: | 2002-03-08 07:57:08 |
Message-ID: | 200203080757.IAA55928@mail.matrice.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Marc Polatschek | 2002-03-08 08:58:52 | Re: Problem with Subquery |
Previous Message | Martijn van Oosterhout | 2002-03-08 07:12:38 | Re: April 1 |