Re: to_char problem - Mailing list pgsql-general

From Richard Huxton
Subject Re: to_char problem
Date
Msg-id 200402162024.18380.dev@archonet.com
Whole thread Raw
In response to to_char problem  ("Wei Wang" <ww220@cam.ac.uk>)
List pgsql-general
On Monday 16 February 2004 19:15, Wei Wang wrote:
> I get compile error for this code:
>
>
> for i in 1..arg_count-1  LOOP
> RAISE NOTICE quote_literal(to_char(i, ''9''));
> END LOOP;
>
> where arg_count = 3.
>
> I tried RAISE NOTICE to_char(i, ''9''); as well.
> to_char returns text, right? Then what did I do wrong here?

Syntax is a little peculiar, you need to do something like

RAISE NOTICE ''hello % world %'',i,j;

Nothing else will do.

--
  Richard Huxton
  Archonet Ltd

pgsql-general by date:

Previous
From: Antonios Christofides
Date:
Subject: Cascade delete triggers change user credentials
Next
From: Stephan Szabo
Date:
Subject: Re: Cascade delete triggers change user credentials