big problem - Mailing list pgsql-general

From Frank_Lupo Frank_Lupo
Subject big problem
Date
Msg-id 200203110822.JAA89241@mail.matrice.it
Whole thread Raw
Responses Re: big problem  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: big problem  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List 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


pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Re: How to rollback a sql
Next
From: "Kaare Rasmussen"
Date:
Subject: Re: FREE ERD TOOL for POSTGRES ???