big problem

From: Frank_Lupo Frank_Lupo <frank_lupo(at)telemail(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: big problem
Date: 2002-03-11 08:22:44
Message-ID: 200203110822.JAA89241@mail.matrice.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

My verions of postgres is 7.2 in window2000.
========================= ==================
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

Bye !!

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message DongSoo Song 2002-03-11 08:43:19 FROM Clause subquery
Previous Message Jeff Davis 2002-03-11 04:32:59 Re: How to rollback a sql