*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.64 2001/03/22 04:00:00 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.65 2001/04/16 02:42:01 tgl Exp $
*
*-------------------------------------------------------------------------
*/
Datum
getdatabaseencoding(PG_FUNCTION_ARGS)
{
- PG_RETURN_NAME("SQL_ASCII");
+ return DirectFunctionCall1(namein, CStringGetDatum("SQL_ASCII"));
}
Datum
PG_encoding_to_char(PG_FUNCTION_ARGS)
{
- PG_RETURN_NAME("SQL_ASCII");
+ return DirectFunctionCall1(namein, CStringGetDatum("SQL_ASCII"));
}
Datum
* This file contains some public functions
* usable for both the backend and the frontend.
* Tatsuo Ishii
- * $Id: common.c,v 1.12 2001/02/11 01:59:22 ishii Exp $
+ * $Id: common.c,v 1.13 2001/04/16 02:42:01 tgl Exp $
*/
#include "postgres.h"
PG_encoding_to_char(PG_FUNCTION_ARGS)
{
int32 encoding = PG_GETARG_INT32(0);
+ const char *encoding_name = pg_encoding_to_char(encoding);
- PG_RETURN_NAME(pg_encoding_to_char(encoding));
+ return DirectFunctionCall1(namein, CStringGetDatum(encoding_name));
}
#endif
* client encoding and server internal encoding.
* (currently mule internal code (mic) is used)
* Tatsuo Ishii
- * $Id: mbutils.c,v 1.16 2001/03/08 00:24:34 tgl Exp $
+ * $Id: mbutils.c,v 1.17 2001/04/16 02:42:01 tgl Exp $
*/
#include "postgres.h"
Datum
getdatabaseencoding(PG_FUNCTION_ARGS)
{
- PG_RETURN_NAME(pg_encoding_to_char(DatabaseEncoding));
+ const char *encoding_name = pg_encoding_to_char(DatabaseEncoding);
+
+ return DirectFunctionCall1(namein, CStringGetDatum(encoding_name));
}