Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXfQa-0008Eq-Pw for pgsql-general@arkaria.postgresql.org; Wed, 28 Oct 2020 06:59:24 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kXfQZ-0007PD-7G for pgsql-general@arkaria.postgresql.org; Wed, 28 Oct 2020 06:59:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kXfQY-0007P5-RC for pgsql-general@lists.postgresql.org; Wed, 28 Oct 2020 06:59:22 +0000 Received: from mail-ed1-x542.google.com ([2a00:1450:4864:20::542]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kXfQV-0006lO-QN for pgsql-general@lists.postgresql.org; Wed, 28 Oct 2020 06:59:22 +0000 Received: by mail-ed1-x542.google.com with SMTP id l24so3960636edj.8 for ; Tue, 27 Oct 2020 23:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cybertec-at.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:date:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=M04VoT5/KUuKHdg3Ju/S7Y0Wkd2xN8P8HLqRfGrswV0=; b=LWCDmDh0FOlUlhLvqSH0kaY/3m5/wSajtY5JOOnPo6VJLbT6u95oV1gJoEsAGVRF95 7CIgPvo7AUbKq4+b/+5xR5dFDc4MNG3DsiePhlL6HBu8F6nrqjKhZNfFjbfQlwlPXaiK xtTS1V3yG7EglgAiZ78UMJNwuBqQG8TpP2hmpKzYqESAqoPGXG+ZYDDR4AXh57IZQ9CQ PwpSB9Ei+FkiIxzHBqbCfQSHjLrvIVhScePjOkNLDPecPw+MLPMds8ABTC14huy9hg1V 2FdXxmQBQqqJQBmn3LKbpZie5BLD+yVtzUvJn5S2MUxyMR3wLu30s6PrMMEDbPOyx0py F8Ag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=M04VoT5/KUuKHdg3Ju/S7Y0Wkd2xN8P8HLqRfGrswV0=; b=fSTDkA8rbjMlv1vc/pm/EfWZVm3QqP6cZ61yHTBwXt08d+NxC5BxJYJzIcHc1Sgd9x jwUjxrre5CSUrG/0oiHeOBgTc3iNgr/IzR5uiEFGeHo7aYi0avfsujYsmrF1m0WFlxsz 2n+i+x1sepb8sqFohujEILc1YdTH50k+RRgClcKTUgjnzgfnVR1RK3+or4k0Kvvi4N0N JqYBOlX5cMK77GFdEo0tyP+f8ybBTQKVUIBuGFaFSS/KLOmbbn/x2TgRrDr08p1VtCG5 Ce3ypvEt6Zx3S4Bi54eG4rs38WRHPBKNR/w0euWfYKGs6JAqH5GOPe48485M94kGjZVd hVyw== X-Gm-Message-State: AOAM531McFu2LG1FgpBY8gpKIb8xy5djt/FaaJTABSEUZ/ydzPeA7axX 4wY5UibMULdtmYsIpxtli70s+D4LOe5Ucw== X-Google-Smtp-Source: ABdhPJwtP6t57xROWD6KcEE0qRiqjefCRRY7TlSk1HWFzDcXRA1YP84fCVW/yys4VOnjQMihgNY4Cw== X-Received: by 2002:aa7:d7c1:: with SMTP id e1mr6310848eds.4.1603868358453; Tue, 27 Oct 2020 23:59:18 -0700 (PDT) Received: from localhost.localdomain (217-149-172-48.nat.highway.telekom.at. [217.149.172.48]) by smtp.gmail.com with ESMTPSA id j24sm2211640edq.29.2020.10.27.23.59.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Oct 2020 23:59:17 -0700 (PDT) Message-ID: <2605285663d506f6eec3f0adde25fd251df80227.camel@cybertec.at> Subject: Re: facing problem in outparameters in c From: Laurenz Albe To: Mahesh Bodepati , "pgsql-general@lists.postgresql.org" Date: Wed, 28 Oct 2020 07:59:17 +0100 In-Reply-To: References: ,<18919421f0e39276ca3f66883a2976500f26f95f.camel@cybertec.at> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Wed, 2020-10-28 at 04:57 +0000, Mahesh Bodepati wrote: > Actually i am calling a postgres function by using c language which description > is defined in database side .when iam calling a postgres function by passing input > and output parameters after excution of function in database side i need output > data in correcsponding output parameters but iam not getting output like that. Right; output parameters in a function are columns in the result set. > i am getting total output data in response pointer.if iam getting total data > in response pointer it is hard to figure out which data is for which output parameter. No, that is very simple. You can call PQfnumber on the result set to find which position in the result set belongs to a certain parameter name. See https://www.postgresql.org/docs/current/libpq-exec.html#LIBPQ-EXEC-SELECT-INFO > can you please check once attached two text files. I looked, and the C code is unreadable. You seem to be mixing embedded SQL and libpq calls, which you shouldn't. There is great value in a consistent indentation style. Yours, Laurenz Albe -- Cybertec | https://www.cybertec-postgresql.com