Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 651039FB453 for ; Thu, 10 May 2007 12:15:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 00989-08 for ; Thu, 10 May 2007 12:15:03 -0300 (ADT) X-Greylist: delayed 00:25:47.522478 by SQLgrey-1.7.5 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id B31F79FB623 for ; Thu, 10 May 2007 12:15:03 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from trabant.cianoz.org (host31-194-149-62.serverdedicati.aruba.it [62.149.194.31]) by svr4.postgresql.org (Postfix) with ESMTP id 06BBF5AF02A for ; Thu, 10 May 2007 14:49:14 +0000 (GMT) Received: from localhost (localhost.localdomain [127.0.0.1]) by trabant.cianoz.org (Postfix) with ESMTP id 961923842A2 for ; Thu, 10 May 2007 16:49:10 +0200 (CEST) X-Virus-Scanned: by amavisd-new at actionlinesrl.it Received: from trabant.cianoz.org ([127.0.0.1]) by localhost (mail.actionlinesrl.it [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Cfj6vwDKEHRm for ; Thu, 10 May 2007 16:48:43 +0200 (CEST) Received: from ivangeo (geologia5.agora.ing.unipg.it [141.250.41.212]) by trabant.cianoz.org (Postfix) with ESMTP id 9AE6638429B for ; Thu, 10 May 2007 16:48:43 +0200 (CEST) Subject: insert a sequence From: ivan marchesini Reply-To: marchesini@unipg.it To: pgsql-sql@postgresql.org Content-Type: text/plain Organization: University of Perugia Date: Thu, 10 May 2007 16:49:32 +0200 Message-Id: <1178808572.4294.15.camel@ivangeo> Mime-Version: 1.0 X-Mailer: Evolution 2.6.3 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200705/79 X-Sequence-Number: 28359 Dear postgres Users, I have a simple question I think. I have a table that contains some columns one of these columns (the columns ID) contains distinct integer values ... I need to insert into this table some other records but I only need that values were inserted into the ID column and that they were progressive... (a sequence starting from 100 and ending to 300, step=1) the other columns must remains null.... can I do this with a sequence and then an "insert into"? many thanks -- Ti prego di cercare di non inviarmi files .doc, .xls, .ppt, .dwg. Preferisco formati liberi. Please try to avoid to send me .doc, .xls, .ppt, .dwg files. I prefer free formats. http://it.wikipedia.org/wiki/Formato_aperto http://en.wikipedia.org/wiki/Open_format Ivan Marchesini Department of Civil and Environmental Engineering University of Perugia Via G. Duranti 93/a 06125 Perugia (Italy) e-mail: marchesini@unipg.it ivan.marchesini@gmail.com tel: +39(0)755853760 fax (university): +39(0)755853756 fax (home): +39(0)5782830887 jabber: geoivan73@jabber.org