Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 58C239FA0EE for ; Fri, 1 Dec 2006 06:47:31 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 91981-05 for ; Fri, 1 Dec 2006 06:47:26 -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 903AA9F942F for ; Fri, 1 Dec 2006 06:47:26 -0400 (AST) thread-index: AccVNheBVwGqeOojRUizbpGjBYlGlg== 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 05:47:26 -0500 Message-ID: <45700839.4090000@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 10:47:21 +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><456FF683.7030705@enterprisedb.com> <20061201115743.288a566a.www.gmail.com@localhost.localdomain> In-Reply-To: <20061201115743.288a566a.www.gmail.com@localhost.localdomain> Content-Type: text/plain; format=flowed; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Dec 2006 10:47:26.0937 (UTC) FILETIME=[1775EC90:01C71536] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/7 X-Sequence-Number: 16239 antongiulio05@gmail.com wrote: > My application is commercial. It uses postgresql. I want include in my-app a "protection-trick" retrieving a some kind of "unique system_identifier". Your pg_control file could be good, but it's a "data-file". How can I extract infos from it? Sounds like a bad idea. system_identifier changes when you dump/restore to another installation. You don't want to forbid your users to restore from a backup, do you? > Around same dir I have found these infos: > > "myappdb" 20496 1663 3221455155 229682 > > Maybe are these the keys? pg_database? No, don't mess with that. And those numbers are not guaranteed to be unique across installations. I'd recommend trusting your users instead of adding limitations like that. They can be a real pain the ass if you're user wants to move his database to another server, run a warm-standby, backup/restore, run in a virtualized environment etc. and you don't want to cause hardship like that to your customers, do you? If you still want to add a server key etc, I'd suggest creating user defined function that extracts a system identifier from somewhere else than the database. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com