Re: to_char problem

From: Richard Huxton <dev(at)archonet(dot)com>
To: "Wei Wang" <ww220(at)cam(dot)ac(dot)uk>, "pgsql" <pgsql-general(at)postgresql(dot)org>
Subject: Re: to_char problem
Date: 2004-02-16 20:24:18
Message-ID: 200402162024.18380.dev@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2004-02-16 21:56:58 Re: Cascade delete triggers change user credentials
Previous Message Antonios Christofides 2004-02-16 20:19:06 Cascade delete triggers change user credentials