Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B5C3B634178 for ; Wed, 3 Jun 2009 09:07:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 98161-06 for ; Wed, 3 Jun 2009 09:07:32 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pz0-f118.google.com (mail-pz0-f118.google.com [209.85.222.118]) by mail.postgresql.org (Postfix) with ESMTP id 325856340EF for ; Wed, 3 Jun 2009 09:07:47 -0300 (ADT) Received: by pzk16 with SMTP id 16so7357912pzk.15 for ; Wed, 03 Jun 2009 05:07:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:mime-version:content-type:content-transfer-encoding :x-mailer:thread-index:content-language; bh=wOk19t6IBNnKIZUO9r/QL8CvaAYGyyt8cIGihusvqaQ=; b=e3GFcLS0XraL6UpSKIChiQAT6Jawq7Jp+pHcfxwdjcHypHml1nIH2L8djA6py0OipZ tMg1ZIrS2DdWJGBYzbW8+FdmX3xtKx/yCpvVphpsLR/v03GxCeO6VkbLuN2JK1G/XbqW f8T3Prrx310e9heAN0Bhkv8CKAutXu7fipna4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-mailer:thread-index:content-language; b=Bm0DPKSCfn37T1ykmUrHR4O/ksP5XNoZM4aJCKVLdGjlCGIt4OtpDa1rsnNcR+lpwf eKa0+2ylqKNsy32rn/z0FBbY4fn1bwB3ISI1A8U/GdeeKMsDJM6wENmr5c9g8VSnntWY iLsgQIw2kfDvzOuGdxsf7qqmvzUhJpwqOrZYI= Received: by 10.143.28.8 with SMTP id f8mr303963wfj.116.1244030866351; Wed, 03 Jun 2009 05:07:46 -0700 (PDT) Received: from BITDLLT03 ([122.160.72.188]) by mx.google.com with ESMTPS id 27sm17378481wfa.2.2009.06.03.05.07.43 (version=SSLv3 cipher=RC4-MD5); Wed, 03 Jun 2009 05:07:45 -0700 (PDT) From: "Jyoti Seth" To: Subject: Creation of file from postgresql function Date: Wed, 3 Jun 2009 17:30:23 +0530 Message-ID: <000001c9e442$e381d140$aa8573c0$@com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Acnjz7KLdFo0huaUQquWhfGDqAITCwAcU5wg Content-Language: en-us X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200906/15 X-Sequence-Number: 32620 Hi, I want to create a file on a disk through postgres function. I am trying to use large objects functions (lo_create, lo_open and lo_write) for this. In this, lo_open command is throwing error "invalid mode" or "Syntax error whereas I have given the value of INV_WRITE from libpq-fs.h as mode. libpq-fs.h File #define INV_WRITE 0x00020000 #define INV_READ 0x00040000 If anyone has idea about this problem or know any other alternative to create a file from postgres function, please let me know. Thanks, Jyoti