Re: Learning Plpgsql ??

From: Jim Beckstrom <jrbeckstrom(at)sbcglobal(dot)net>
To: jonathon(at)octahedron(dot)com(dot)au
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Learning Plpgsql ??
Date: 2003-01-24 04:21:44
Message-ID: 3E30BF58.1060302@sbcglobal.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Coming from another newbie, here's what I use to set the sequence
following an import of text data. I create seqence and table and import
one file at a time, for a one time conversion, so I don't need the table
of table names,etc., but that's a great idea, like a data dictionary
concept. Would this work, modified to fit your loop syntax?

select SETVAL('link_rep_link_rep_id_seq', (select max(link_rep_id) from
link_rep))

Jim

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2003-01-24 05:38:17 Re: Long time Vacuum full
Previous Message Roman Fail 2003-01-24 01:57:51 Re: Learning Plpgsql ??