Re: how do the pro's do this? (still a newbie)

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Gunnar Lindholm <gunnar(at)gunix(dot)mine(dot)nu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: how do the pro's do this? (still a newbie)
Date: 2001-11-03 08:32:09
Message-ID: 20011103193209.A6811@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, Nov 03, 2001 at 08:34:37AM +0100, Gunnar Lindholm wrote:
> I wrote a function similar to this and when inserting
> select foo('/new.html','194.165.2.24','2001-Oct-28 10:34:25+01');
> it complains that
> ERROR: Attribute 'vad_seq' not found
> "vad_seq" is a sequence just like "something" is in the example above.
> The code I wrote is written below... So if anybody can tell me what's wrong,
> please do so. I find the error message very strange. I can't believe that it
> can not find the sequence.... Shouldn't the sequence be accessible from every
> function in that database?

Well, my only suggestion is:

> ivad := nextval("vad_seq");
^^^^^^^^^

Should the name be in single quotes?

HTH,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org>
http://svana.org/kleptog/
> Magnetism, electricity and motion are like a three-for-two special offer:
> if you have two of them, the third one comes free.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Gunnar Lindholm 2001-11-03 08:36:08 Re: how do the pro's do this? (still a newbie)
Previous Message Eric Ridge 2001-11-03 07:47:24 SETOF and language 'plpgsql'