Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id C0825475A71 for ; Wed, 28 Aug 2002 12:08:10 -0400 (EDT) Received: from wired.emaze.net (proxy.ingsoc.org [213.178.220.5]) by postgresql.org (Postfix) with ESMTP id 2BA8F475843 for ; Wed, 28 Aug 2002 12:08:09 -0400 (EDT) Received: (from tp@localhost) by wired.emaze.net (8.11.2/8.11.2/SuSE Linux 8.11.1-0.5) id g7SG9TZ17460 for pgsql-sql@postgresql.org; Wed, 28 Aug 2002 16:09:29 GMT Date: Wed, 28 Aug 2002 16:09:29 +0000 From: tp To: pgsql-sql@postgresql.org Subject: UPDATE & LIMIT together? Message-ID: <20020828160929.GL20155@emaze.net> Reply-To: tp@emaze.net Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6cCUF33RYdKJBOlz" Content-Disposition: inline User-Agent: Mutt/1.3.25i X-Sender: tp@emaze.net X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/396 X-Sequence-Number: 9242 --6cCUF33RYdKJBOlz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi I want to SELECT at max. 10 rows and SET a variable for the select 10 rows with the same query. Under mysql i can use: UPDATE table SET uniq_iq=12345 LIMIT 10 SELECT * FROM table WHERE uniq_id=1234; This is not supported by postgres. Is there some easy solution that does not require locking? -tp --6cCUF33RYdKJBOlz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9bPW492yJW/Ptn2IRApGkAJ42CP0g3NwUaza46LmBCbmT2iU2ygCdG60G bi1YatuVQmW8E0aBW5qOags= =zy5Y -----END PGP SIGNATURE----- --6cCUF33RYdKJBOlz--