Re: Insert and limit - Mailing list pgsql-general

From Richard Huxton
Subject Re: Insert and limit
Date
Msg-id 003b01c0f593$7a540c20$1001a8c0@archonet.com
Whole thread Raw
In response to Insert and limit  ("Matteo Centenaro" <gente_che_mixa@hotmail.com>)
List pgsql-general
From: "Matteo Centenaro" <gente_che_mixa@hotmail.com>

> Hi all,
>  is possible that the limit statement dosen't run correctly in this case:
>
> Insert into temp
> Select * from tab1
> Where cod = xxxx
> Limit yyy;

Works here.

richardh=> select * from foo;
 a |                b
---+----------------------------------
 4 | Jack Smith
 5 | Andrea Ottwick
(2 rows)

richardh=> insert into foo2 select * from foo limit 1;
INSERT 20788 1
richardh=> select * from foo2;
 a |                b
---+----------------------------------
 4 | Jack Smith
(1 row)

version 7.1.1

- Richard Huxton


pgsql-general by date:

Previous
From: "Matteo Centenaro"
Date:
Subject: Insert and limit
Next
From: "Richard Huxton"
Date:
Subject: Re: Insert and limit