From: | Rodrigo Gonzalez <rjgonzale(at)gmail(dot)com> |
---|---|
To: | MargaretGillon(at)chromalloy(dot)com |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Varchar concatenate fields as Char or Varchar, not |
Date: | 2006-08-07 18:36:28 |
Message-ID: | 44D7882C.8020105@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Really, I dont see the 3 varchar fields concatenated to a new field.
But do this....
(varchar1||varchar2||varchar3||newfield)::varchar
Best regards
MargaretGillon(at)chromalloy(dot)com wrote:
>
> Last week I upgraded to postgresql 8.1.4 (YEAH!) In my database I
> have a view which concatenates three varchar fields to a new field.
> With postgresql 7.2.3 the field resulting from the concatenation was a
> varchar, with postgresql 8.1.4 the new field is a text field. This is
> affecting all kinds of forms in my application. Is there a way I can
> get the output as char or varchar? View code is below.
>
>
> CREATE OR REPLACE VIEW vweventsummary AS
> SELECT b.ltname, (c.refullname::text || d.enname::text) ||
> f.evname::text AS evlinkname1,
> (g.refullname::text || h.enname::text) || i.evname::text AS evlinkname2,
> a.evid, a.evlinktype, a.eventity1, a.evevent1, a.evresource1,
> a.eventity2, a.evevent2, a.evresource2
> FROM event a, linktype b, resource c, entity d, event f, resource g,
> entity h, event i
> WHERE a.evlinktype = b.ltid AND a.evevent1 = f.evid AND
> a.evevent2 = i.evid AND a.evresource1 = c.reid
> AND a.evresource2 = g.reid AND a.eventity1 = d.enid AND a.eventity2 =
> h.enid;
>
>
> *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
> *** *** ***
> Margaret Gillon, IS Dept., Chromalloy Los Angeles, ext. 297
>
> This e-mail message and any attachment(s) are for the sole use of the
> intended recipient(s) and may contain proprietary and/or confidential
> information which may be privileged or otherwise protected from
> disclosure. Any unauthorized review, use, disclosure or distribution
> is prohibited. If you are not the intended recipient(s), please
> contact the sender by reply email and destroy the original message and
> any copies of the message as well as any attachment(s) to the original
> message.
From | Date | Subject | |
---|---|---|---|
Next Message | MargaretGillon | 2006-08-07 18:39:15 | Re: Varchar concatenate fields as Char or Varchar, not Text |
Previous Message | Uwe C. Schroeder | 2006-08-07 18:30:28 | Re: Varchar concatenate fields as Char or Varchar, not Text |