pg-8.4-char.patch

text/x-diff

Filename: pg-8.4-char.patch
Type: text/x-diff
Part: 0
Message: Re: BUG #5028: CASE returns ELSE value always when type is "char"

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: context
File+
src/backend/utils/adt/char.c 6 0
*** src/backend/utils/adt/char.c~	2009-01-01 17:23:49.000000000 +0000
--- src/backend/utils/adt/char.c	2009-09-02 10:11:13.000000000 +0100
***************
*** 34,39 ****
--- 34,45 ----
  {
  	char	   *ch = PG_GETARG_CSTRING(0);
  
+ 	if (ch[1])
+ 		ereport(ERROR,
+ 				(errcode(ERRCODE_INVALID_TEXT_REPRESENTATION),
+ 				 errmsg("only a single character is supported in \"char\" literals: \"%s\"",
+ 						ch)));
+ 
  	PG_RETURN_CHAR(ch[0]);
  }