From: | Bill Moran <wmoran(at)potentialtech(dot)com> |
---|---|
To: | marcelo Cortez <jmdc_marcelo(at)yahoo(dot)com(dot)ar> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: string fields helps |
Date: | 2007-04-16 23:58:59 |
Message-ID: | 20070416195859.af706ade.wmoran@potentialtech.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
marcelo Cortez <jmdc_marcelo(at)yahoo(dot)com(dot)ar> wrote:
>
> Folks
>
> I need to save data on rtf format but , postgres
> refuses to storage for backslah or character's
> problem's any idea or vice are welcomed best
> regards
> mdc
You need to escape the data before you insert it. This is language-
dependant, but any language that has PostgreSQL libraries will have
functions to escape text data.
>
> pd: sample off data to save ( from postgres log)
>
> "
> UPDATE plbrecord SET documentation =
> '{\rtf1\ansi\deff0{\fonttbl{\f0\fnil Tahoma;}}
> \viewkind4\uc1\pard\lang1033\f0\fs16
> \par }
> ', version_ = 4 WHERE (plbrecord.id_ = 8 AND
> plbrecord.version_ = 3 AND plbrecord.inst_class_ =
> 'EntityDataWindow')
> LOG: statement: COMMIT1
> LOG: statement: BEGIN
> LOG: statement: UPDATE plbrecord SET documentation =
> '{\rtf1\ansi\deff0{\fonttbl{\f0\fnil Tahoma;}}
> \viewkind4\uc1\pard\lang1033\f0\fs16 SELECT
> "PARAMETROS"."PARAMETRO",
> \par
> substr(to_char("PARAMETROS"."F_VAL_PARAM",
> ''YYYY/MM/DD''), 1,10),
> \par
> substr(to_char("PARAMETROS"."F_ANUL_PARAM",''YYYY/MM/DD''),
> 1,10),
> \par "PARAMETROS"."VALOR1",
> \par "PARAMETROS"."VALOR2"
> \par FROM "PARAMETROS"
> \par " )
> \par
> \par }
> ', version_ = 5 WHERE (plbrecord.id_ = 8 AND
> plbrecord.version_ = 4 AND plbrecord.inst_class_ =
> 'EntityDataWindow')
> LOG: statement: COMMIT
> LOG: statement: BEGIN
> LOG: statement: UPDATE plbrecord SET documentation =
> '{\rtf1\ansi\deff0{\fonttbl{\f0\fnil\fcharset0
> Tahoma;}{\f1\fnil Tahoma;}}
> \viewkind4\uc1\pard\lang1033\f0\fs18 SELECT
> "PARAMETROS"."PARAMETRO",
> \par
> substr(to_char("PARAMETROS"."F_VAL_PARAM",
> ''YYYY/MM/DD''), 1,10),
> \par
> substr(to_char("PARAMETROS"."F_ANUL_PARAM",''YYYY/MM/DD''),
> 1,10),
> \par "PARAMETROS"."VALOR1",
> \par "PARAMETROS"."VALOR2"
> \par FROM "PARAMETROS"
> \par " )
> \par \f1\fs16
> \par }
> "
>
>
> __________________________________________________
> Preguntá. Respondé. Descubrí.
> Todo lo que querías saber, y lo que ni imaginabas,
> está en Yahoo! Respuestas (Beta).
> ¡Probalo ya!
> http://www.yahoo.com.ar/respuestas
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
--
Bill Moran
http://www.potentialtech.com
From | Date | Subject | |
---|---|---|---|
Next Message | Jeff Davis | 2007-04-17 00:23:41 | Re: digest data types? |
Previous Message | Tom Lane | 2007-04-16 22:24:25 | Re: Dynamic DDL |