From: A. Kretschmer <andreas.kretschmer@schollglas.com>
To: pgsql-sql@postgresql.org
Subject: Re: how do I to generate a sequence Range or Set of integer constants
Date: Fri, 23 Feb 2007 20:31:53 +0100
Message-ID: <20070223193153.GA1962@a-kretschmer.de> (raw)
In-Reply-To: <200702231925.35411.pgsql@yukonho.de>
References: <200702231925.35411.pgsql@yukonho.de>
am Fri, dem 23.02.2007, um 19:25:35 +0100 mailte Stefan Becker folgendes:
> Now: Is there a syntax that allows for the following.....
>
> create table XX (id int);
> insert into XX (select xx from "1 to 1000" of integers)
Perhaps you are searching for generate_series():
test=*# select generate_series(1,10);
generate_series
-----------------
1
2
3
4
5
6
7
8
9
10
(10 rows)
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: andreas.kretschmer@schollglas.com
Subject: Re: how do I to generate a sequence Range or Set of integer constants
In-Reply-To: <20070223193153.GA1962@a-kretschmer.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox