Richard Huxton wrote:
Sergey Karin wrote:
Are there any abilities to represent NULL values as string?
Null isn't a real value. Try not to think of it as a value.
That being said, and with due credit elsewhere (http://www.varlena.com/varlena/GeneralBits/84.php), what I do is
CREATE OR REPLACE FUNCTION public.textcat_null(text, text)
RETURNS text AS
'SELECT textcat(COALESCE($1, ''''), COALESCE($2, ''''));'
LANGUAGE sql' VOLATILE;
CREATE OPERATOR public.||+(
PROCEDURE = "public.textcat_null",
LEFTARG = text,
RIGHTARG = text);
This goes against proper form, considering what NULL is designed for, but it
sure is convenient.
Regards,
Berend Tober
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org