Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1X4N7L-0004ue-MX for pgsql-interfaces@arkaria.postgresql.org; Tue, 08 Jul 2014 04:34:59 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1X4N7L-0008Ry-1V for pgsql-interfaces@arkaria.postgresql.org; Tue, 08 Jul 2014 04:34:59 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1X3vs7-0001hp-WE for pgsql-interfaces@postgresql.org; Sun, 06 Jul 2014 23:29:28 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1X3vs0-0004O2-DG for pgsql-interfaces@postgresql.org; Sun, 06 Jul 2014 23:29:25 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1X3vry-0006bq-V9 for pgsql-interfaces@postgresql.org; Sun, 06 Jul 2014 16:29:18 -0700 Date: Sun, 6 Jul 2014 16:29:18 -0700 (PDT) From: madhu_d To: pgsql-interfaces@postgresql.org Message-ID: <1404689358939-5810684.post@n5.nabble.com> Subject: Insert/update a column if it doesnot exists in a database using C program MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 3.5 (+++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-interfaces Precedence: bulk Sender: pgsql-interfaces-owner@postgresql.org I am a newbie in writing C programs to read postgresql database. I am writing a C program to insert two new columns to a table if they don't exist. If they exists, then simply update it. I found a solution in the link: http://stackoverflow.com/questions/12597465/how-to-add-column-if-not-exists-on-postgresql but have no clue to implement it in a C program. Can anyone suggest a way to implement it.. -- View this message in context: http://postgresql.1045698.n5.nabble.com/Insert-update-a-column-if-it-doesnot-exists-in-a-database-using-C-program-tp5810684.html Sent from the PostgreSQL - interfaces mailing list archive at Nabble.com. -- Sent via pgsql-interfaces mailing list (pgsql-interfaces@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-interfaces