Re: Pl Pgsql problem - Mailing list pgsql-sql

From lihao
Subject Re: Pl Pgsql problem
Date
Msg-id 001901c30d6e$f4849880$f301a8c0@pc66
Whole thread Raw
In response to Re: Pl Pgsql problem  (Tomasz Myrta <jasiek@klaster.net>)
List pgsql-sql
Hi,

What I try to get is 

venus=# select ('UPD' || int2hex(nextval('updid'), 8)) as v_updid;  v_updid   
-------------UPD0000145C
(1 row)
updid is a sequence. I am try to generate a index with character and
sequence number.

Anyway, I solve it by change the script to :

select (''UPD'' || int2hex(nextval(''updid''), 8)) into v_updid;

Thank you.

Li Hao


-----Original Message-----
From: pgsql-sql-owner@postgresql.org
[mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Tomasz Myrta
Sent: Monday, April 28, 2003 5:20 PM
To: lihao
Cc: pgsql-sql@postgresql.org
Subject: Re: [SQL] Pl Pgsql problem

Dnia 2003-04-28 11:29, Uz.ytkownik lihao napisa?:

> So the Line 9 is this line:
>             select (''UPD'' || int2hex(nextval(''updid''), 8)) as
> v_updid;
Did you mean:

select into v_updid ''UPD'' || int2hex(nextval(''updid''), 8);
?

Tomasz


---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



pgsql-sql by date:

Previous
From: Joseph Syjuco
Date:
Subject: jsp postgres installation/configuration howto url
Next
From: Rajesh Kumar Mallah
Date:
Subject: plpgsql Question..