Hello !
There is one's more question, which way I have to determine that void *
randBuf acceptable or not for bytea type ?
Thanks in advance.
On Fri, May 3, 2013 at 9:44 PM, Yuriy Rusinov wrote:
> Thanks a lot, I have corrected and bug was fixed.
>
>
> On Fri, May 3, 2013 at 6:42 PM, Tom Lane
Thanks a lot, I have corrected and bug was fixed.
On Fri, May 3, 2013 at 6:42 PM, Tom Lane wrote:
> Yuriy Rusinov writes:
> > In C-function I do
> > size_t nr_ins = strlen ("insert into rand_state (state_rand) values
> ($1);");
> > char * r_sql = (char *) palloc (nr_ins + 1);
> > strncpy (r_sq
Yuriy Rusinov writes:
> In C-function I do
> size_t nr_ins = strlen ("insert into rand_state (state_rand) values ($1);");
> char * r_sql = (char *) palloc (nr_ins + 1);
> strncpy (r_sql, "insert into rand_state (state_rand) values ($1);", nr_ins);
This is a hard, error-prone, and ultimately incor
I'm sorry !
But if I commented SPI_execute_with_args call, then all others works
without bugs.
On Fri, May 3, 2013 at 2:31 PM, Gavin Flower
wrote:
> On 03/05/13 21:19, Yuriy Rusinov wrote:
>
> Hello, colleagues !
>
> I have to write random number generator state into database table
> Table st
On 03/05/13 21:19, Yuriy Rusinov wrote:
Hello, colleagues !
I have to write random number generator state into database table
Table structure is
table rand_state
{
id serial not null primary key,
state_rand bytea
};
In C-function I do
size_t nr_ins = strlen ("insert into rand_state (sta
Hello, colleagues !
I have to write random number generator state into database table
Table structure is
table rand_state
{
id serial not null primary key,
state_rand bytea
};
In C-function I do
size_t nr_ins = strlen ("insert into rand_state (state_rand) values ($1);");
char * r_sql = (c