X-Original-To: pgsql-sql@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 3E70A474E5C for ; Sun, 9 Feb 2003 02:28:35 -0500 (EST) Received: from hotmail.com (dav49.law15.hotmail.com [64.4.22.21]) by postgresql.org (Postfix) with ESMTP id 95FB74758DC for ; Sun, 9 Feb 2003 02:28:34 -0500 (EST) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Sat, 8 Feb 2003 23:28:34 -0800 X-Originating-IP: [194.29.36.33] From: "Hanan Hotmail" To: "pgsql" Subject: Design question: How to convert a given data structure to sql and the opposite. Date: Sat, 8 Feb 2003 18:23:57 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1255" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.3018.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.3018.1300 Message-ID: X-OriginalArrivalTime: 09 Feb 2003 07:28:34.0851 (UTC) FILETIME=[DAC7D730:01C2D00C] X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200302/177 X-Sequence-Number: 11575 Hi, Configuration: I'm using postgresql 7.3 on Linux box ( RH 7.3) from Perl DBI module. The problem: I'm implementing a very interesting system where i need to enable via user interface (WEB GUI ) to build/update and execute SQL queries on my DB scheme. 1. I need to translate a given data structure to SQL query . 2. I need to load SQL query to memory. Generaly i need to convert from a given data structure to sql and the opposite which means i want to represent a generic SQL in terms and i want to be able to load saved query and execute it. Just to make things clear i will detail to scenarios: 1 . A User => Creates a query using GUI => he/she can execute the query 2. A query is stored somehow => The user update the query according to his needs => the user save the query and then execute it. Any idea/direction will be welcome ? Hanan