oops, forgot to reply all.
> > Dear All,
> > Thank you very much for your answers. I just want to summarize:
> > 1. create sequence:
> > CREATE SEQUENCE myseq;
> >
> > 2. insert sequence function calls into VIEW:
> > CREATE OR REPLACE VIEW my_view AS SELECT
> > nextval('myseq')::text AS test,
> > knoten.knoten,
> > FROM
> > setval('myseq',1),
> > knoten knoten
> > WHERE
> > knoten.knoten::text = knoten_flaeche.knoten::text;
> >
> > In Postgres it seems to work fine, but not yet in my application.
> > My doubt is about setval('myseq',1). I am not sure that it will always
> > works fine when I access view from my application. For example when I
> > call on_update rule.
>
> Maybe use a set returning function. So people on the list call it a store procedure.
> http://www.postgresql.org/docs/8.1/interactive/xfunc-sql.html
>
> This way to can add for than one SQL statement to the fuction. 1 to reset your sequence and 1
> to
> display your query.
>
> Regards,
>
> Richard Broersma Jr.
>