Queries the attributes that are supported by PolarDB for PostgreSQL(Compatible with Oracle) or PolarDB for PostgreSQL databases, such as the character sets and collations.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeDBInitializeVariable | The operation that you want to perform. Set the value to DescribeDBInitializeVariable. |
DBClusterId | String | Yes | pc-**************** | The ID of the cluster. Note You can call the DescribeDBClusters operation to query the information of all clusters that are deployed in a specified region, including the cluster IDs. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Variables | Array of Variable | The result data that is returned. | |
Variable | |||
Charset | String | EUC_CN | The character set that is supported. |
Collate | String | C | The language that specifies the collation of the database that is to be created. Note
To view the valid values of this parameter, perform the following steps: Log on to the PolarDB console and click the ID of a cluster. In the left-side navigation pane, choose Settings and Management > Databases. Then, click Create Database. |
Ctype | String | C | The language that specifies the character type of the database. Note
To view the valid values of this parameter, perform the following steps: Log on to the PolarDB console and click the ID of a cluster. In the left-side navigation pane, choose Settings and Management > Databases. Then, click Create Database. |
DBVersion | String | 11 | The version of the database engine. |
RequestId | String | 475F58B7-F394-4394-AA6E-4F1CBA****** | The ID of the request. |
DBType | String | PostgreSQL | The type of the database. Valid values:
|
Examples
Sample requests
http(s)://polardb.aliyuncs.com/?Action=DescribeDBInitializeVariable
&DBClusterId=pc-****************
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<ResponseResponse>
<Variables>
<Variable>
<Charset>EUC_CN</Charset>
<Collate>C</Collate>
<Ctype>C</Ctype>
</Variable>
<Variable>
<Charset>EUC_CN</Charset>
<Collate>POSIX</Collate>
<Ctype>POSIX</Ctype>
</Variable>
</Variables>
<DBVersion>11</DBVersion>
<RequestId>475F58B7-F394-4394-AA6E-4F1CBA1F2FE8</RequestId>
<DBType>PostgreSQL</DBType>
</ResponseResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Variables" : {
"Variable" : [ {
"Charset" : "EUC_CN",
"Collate" : "C",
"Ctype" : "C"
}, {
"Charset" : "EUC_CN",
"Collate" : "POSIX",
"Ctype" : "POSIX"
} ]
},
"DBVersion" : "11",
"RequestId" : "475F58B7-F394-4394-AA6E-4F1CBA1F2FE8",
"DBType" : "PostgreSQL"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
404 | InvalidDBClusterId.NotFound | The DBClusterId provided does not exist in our records. | The error message returned because the specified cluster ID does not exist in the current record. |
For a list of error codes, see Service error codes.