Received: from ginsberg.uol.com.br (ginsberg.uol.com.br [200.231.206.26]) by postgresql.org (8.11.3/8.11.4) with ESMTP id g0N5t7l19306 for ; Wed, 23 Jan 2002 00:55:07 -0500 (EST) (envelope-from mlemos@acm.org) Received: from acm.org ([200.221.72.147]) by ginsberg.uol.com.br (8.9.1/8.9.1) with ESMTP id DAA22803; Wed, 23 Jan 2002 03:54:06 -0200 (BRST) Message-ID: <3C4E5013.CA5C24FC@acm.org> Date: Wed, 23 Jan 2002 03:54:27 -0200 From: Manuel Lemos X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.2.18 i686) X-Accept-Language: en MIME-Version: 1.0 To: Christopher Kings-Lynne CC: Francisco Reyes , PostgresSQL PHP list Subject: Re: "SQL" REPLACE SYNTAX References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200201/59 X-Sequence-Number: 864 Hello, Christopher Kings-Lynne wrote: > > > Look at Metabase implementation. Metabase comes with a driver > > conformance test that verifies if features like this work properly in > > all supported databases. Don't you think that I would release a version > > of Metabase that would not pass that test if all databases? > > > > The application needs to hint it as it is something that does not change > > at runtime, so there is no penalty of figuring that by querying the > > database server and some database do not provide a way to tell you which > > fields are the primary key. > > OK, so it's not a simulation of the MySQL syntax - MySQL requires no hints. No, but the functionality is the same. MySQL ignores the hints because SQL REPLACE works as intended without the hints. > I've looked thru the code and yeah, basically that's what you have to do, so > long as you can get the app programmer to tell you in the code what the > primary keys are. For a postgres implementation, it's more difficult. It is required. If the programmer does not tell which fields are the keys, the function will fail with an error stating that. > BTW, there's no documentation anywhere in your code - makes it a bit > difficult to see what's going on... Erm.... there is 248K HTML document that details all about that function the whole Metabase API. :-) Regards, Manuel Lemos