Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id D61F19FA26D for ; Fri, 1 Dec 2006 05:31:56 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 62434-02 for ; Fri, 1 Dec 2006 05:31:51 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from mail01.enterprisedb.com (mail01.enterprisedb.com [63.246.7.168]) by postgresql.org (Postfix) with ESMTP id 998529FA173 for ; Fri, 1 Dec 2006 05:31:51 -0400 (AST) thread-index: AccVK4nCQTBY1LdDQW6LO6mtg6cOLA== Received: from [192.168.1.34] ([82.27.233.193]) by mail01.enterprisedb.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.1830); Fri, 1 Dec 2006 04:31:53 -0500 Message-ID: <456FF683.7030705@enterprisedb.com> Content-Class: urn:content-classes:message Importance: normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.2757 Date: Fri, 01 Dec 2006 09:31:47 +0000 From: "Heikki Linnakangas" User-Agent: Thunderbird 1.5.0.7 (X11/20060927) MIME-Version: 1.0 To: Cc: Subject: Re: Authentication trick References: <20061130191032.fe2311a9.www.gmail.com@localhost.localdomain> In-Reply-To: <20061130191032.fe2311a9.www.gmail.com@localhost.localdomain> Content-Type: text/plain; format=flowed; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Dec 2006 09:31:53.0859 (UTC) FILETIME=[89891D30:01C7152B] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/3 X-Sequence-Number: 16235 antongiulio05@gmail.com wrote: > Hi, > > some commercial softwares use a trick to avoid copy of a db, license-crack, etc. They use generate a key -> "ID of db-instance". For example, if you dump a db on other machine with postgres installed, this key will be different and so application will not start. PostgreSQL is not commercial, so there's no need for such artificial restrictions. There is, however, a unique system_identifier in pg_control file that's generated when initdb is run. It's used on WAL replay to check that the WAL logs were generated by the same installation. > It was good for Oracle, DB2 and MS-SQL. Is there a "similar key" for Postgres? Is it possible retrieve it via-jdbc? How? There's no way to retrieve system_identifier from the client. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com