From: | "Meskes, Michael" <meskes(at)topsystem(dot)de> |
---|---|
To: | "'Vadim B(dot) Mikheev'" <vadim(at)sable(dot)krasnoyarsk(dot)su>, Michael Meskes <meskes(at)topsystem(dot)de> |
Cc: | PostgreSQL Hacker <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | RE: [HACKERS] Recursive queries? |
Date: | 1998-02-20 10:35:18 |
Message-ID: | 11720CEF3853D011AC0C00A024B7A9E1112586@EINSTEIN |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
But such a statement is executed only once, isn't it?
Postquel did execute a retrieve* into as long as it was able to generate
new data.
Michael
P.S.: Glad I'm not the only one interested in this. :-)
--
Dr. Michael Meskes, Project-Manager | topsystem Systemhaus GmbH
meskes(at)topsystem(dot)de | Europark A2, Adenauerstr. 20
meskes(at)debian(dot)org | 52146 Wuerselen
Go SF49ers! Go Rhein Fire! | Tel: (+49) 2405/4670-44
Use Debian GNU/Linux! | Fax: (+49) 2405/4670-10
> -----Original Message-----
> From: Vadim B. Mikheev [SMTP:vadim(at)sable(dot)krasnoyarsk(dot)su]
> Sent: Friday, February 20, 1998 10:59 AM
> To: Michael Meskes
> Cc: PostgreSQL Hacker
> Subject: Re: [HACKERS] Recursive queries?
>
> Michael Meskes wrote:
> >
> > I know that postgres originally was able to do recursive queries
> like
> >
> > retrieve* into a from a ...
> >
> > Is this still possible with PostgreSQL? If so, is it just for one
> statement
> > or even as a block?
>
> Yes, it's possible. This is from spi.txt:
> ---
> Data changes visibility
>
> PostgreSQL data changes visibility rule: during a query execution,
> data
> changes made by the query itself (via SQL-function, SPI-function,
> triggers)
> are invisible to the query scan. For example, in query
>
> INSERT INTO a SELECT * FROM a
>
> tuples inserted are invisible for SELECT' scan. In effect, this
> duplicates the database table within itself (subject to unique index
> rules, of course) without recursing.
>
> Changes made by query Q are visible by queries which are started
> after
> query Q, no matter whether they are started inside Q (during the
> execution
> of Q) or after Q is done.
> ---
>
> Second query 'INSERT INTO a SELECT * FROM a' inside BEGIN/END
> will see tuples inserted by first one. Pg uses special CommandCounter
> to distinguish changes made in the same transaction.
>
> > This happens to be the area I worked on for several years.
>
> I also like such areas :)
>
> Vadim
From | Date | Subject | |
---|---|---|---|
Next Message | Pedro J. Lobo | 1998-02-20 10:47:22 | Re: [PORTS] Platform status |
Previous Message | Vadim B. Mikheev | 1998-02-20 09:59:17 | Re: [HACKERS] Recursive queries? |