create_conversion.7

来自「PostgreSQL 8.2中增加了很多企业用户所需要的功能和性能上的提高,其开」· 7 代码 · 共 86 行

7
86
字号
.\\" auto-generated by docbook2man-spec $Revision: 1.1.1.1 $.TH "CREATE CONVERSION" "" "2008-01-03" "SQL - Language Statements" "SQL Commands".SH NAMECREATE CONVERSION \- define a new encoding conversion.SH SYNOPSIS.sp.nfCREATE [ DEFAULT ] CONVERSION \fIname\fR    FOR \fIsource_encoding\fR TO \fIdest_encoding\fR FROM \fIfuncname\fR.sp.fi.SH "DESCRIPTION".PP\fBCREATE CONVERSION\fR defines a new conversion betweencharacter set encodings. Conversion names may be used in the\fBconvert\fR functionto specify a particular encoding conversion. Also, conversions thatare marked DEFAULT can be used for automatic encodingconversion betweenclient and server. For this purpose, two conversions, from encoding A toB \fBand\fR from encoding B to A, must be defined..PPTo be able to create a conversion, you must have EXECUTE privilegeon the function and CREATE privilege on the destination schema..SH "PARAMETERS".TP\fBDEFAULT\fRThe DEFAULT clause indicates that this conversionis the default for this particular source to destinationencoding. There should be only one default encoding in a schemafor the encoding pair..TP\fB\fIname\fB\fRThe name of the conversion. The conversion name may beschema-qualified. If it is not, the conversion is defined in thecurrent schema. The conversion name must be unique within aschema..TP\fB\fIsource_encoding\fB\fRThe source encoding name..TP\fB\fIdest_encoding\fB\fRThe destination encoding name..TP\fB\fIfuncname\fB\fRThe function used to perform the conversion. The function name maybe schema-qualified. If it is not, the function will be lookedup in the path.The function must have the following signature:.sp.nfconv_proc(    integer,  -- source encoding ID    integer,  -- destination encoding ID    cstring,  -- source string (null terminated C string)    internal, -- destination (fill with a null terminated C string)    integer   -- source string length) RETURNS void;.sp.fi.SH "NOTES".PPUse \fBDROP CONVERSION\fR to remove user-defined conversions..PPThe privileges required to create a conversion may be changed in a futurerelease..SH "EXAMPLES".PPTo create a conversion from encoding UTF8 toLATIN1 using \fBmyfunc\fR:.sp.nfCREATE CONVERSION myconv FOR 'UTF8' TO 'LATIN1' FROM myfunc;.sp.fi.SH "COMPATIBILITY".PP\fBCREATE CONVERSION\fRis a PostgreSQL extension.There is no \fBCREATE CONVERSION\fRstatement in the SQL standard..SH "SEE ALSO"ALTER CONVERSION [\fBalter_conversion\fR(7)], CREATE FUNCTION [\fBcreate_function\fR(l)], DROP CONVERSION [\fBdrop_conversion\fR(l)]

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?