Re: Need assistance for running postgresql procedures

From: Francisco Olarte <folarte(at)peoplecall(dot)com>
To: Sasmit Utkarsh <utkarshsasmit(at)gmail(dot)com>
Cc: pgsql-general(at)lists(dot)postgresql(dot)org
Subject: Re: Need assistance for running postgresql procedures
Date: 2024-01-23 20:28:23
Message-ID: CA+bJJbz9pv7NJV2XXiDJ_bJCF7bqgcwc-Bm98Y8SxBm0KGa4-A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi sasmit.

On Tue, 23 Jan 2024 at 18:51, Sasmit Utkarsh <utkarshsasmit(at)gmail(dot)com> wrote:
> Kindly assist with the issue faced while calling procedures on postgresql using libpq in C. I have attached all the details in the note. Please let me know if you need any more information

I'm not familiar with using binary parameters, but are you sured you
do not need calling htonl(3) on the rtp value? ( 3 is man section, not
htonl argument ).

"Values passed in binary format require knowledge of the internal
representation expected by the backend.
********* For example, integers must be passed in network byte order. ******
Passing numeric values requires knowledge of the server storage
format, as implemented in
src/backend/utils/adt/numeric.c::numeric_send() and
src/backend/utils/adt/numeric.c::numeric_recv()."

A quick test would be to use rtp=0x04000000 and see if it then works (
if it comes from cmd line or similar, if it comes from code just use
hton )

Francisco Olarte.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scot Kreienkamp 2024-01-23 20:33:32 RE: Disk Groups/Storage Management for a Large Database in PostgreSQL
Previous Message Pierre Forstmann 2024-01-23 18:45:05 Re: how to trace a backend session