Search Postgresql Archives

Re: escape string type for upcoming 8.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Tom Lane wrote:
> Having said that, though, I'm agin back-porting this.  We don't
> back-patch feature additions, and this can hardly be described as
> a bug fix.
> 

I'm not for or against back porting this feature. I basically want to
know if my plan (appended to this email) was a sane way to write
forward-compatible code.

I can't rely on PQescapeString, because the client library may be a
different version than the server. Right?

The only other logical option is to make a wrapper function around two
string-escaping functions that checks the server version and creates a
string accordingly.

Regards,
	Jeff Davis

PS: my plan for making an E'' like string in 8.0:

CREATE FUNCTION ein(CSTRING) RETURNS E AS 'textin' LANGUAGE internal;

CREATE FUNCTION eout(E) RETURNS CSTRING AS 'textout' LANGUAGE internal;

CREATE TYPE E (input=ein,output=eout);

CREATE CAST (E AS TEXT) WITHOUT FUNCTION AS IMPLICIT;

CREATE CAST (TEXT AS E) WITHOUT FUNCTION AS IMPLICIT;

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux