pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
there is no an example in reloptions.c for string?
2+ messages / 2 participants
[nested] [flat]

* there is no an example in reloptions.c for string?
@ 2022-10-31 03:24 jacktby@gmail.com <jacktby@gmail.com>
  2022-10-31 03:48 ` Re: there is no an example in reloptions.c for string? David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 1 reply; 2+ messages in thread

From: jacktby@gmail.com @ 2022-10-31 03:24 UTC (permalink / raw)
  To: pgsql-general <pgsql-general@lists.postgresql.org>

jacktby@gmail.com



--------------



here is the codes for pg16.



static relopt_string stringRelOpts[] =



{



	/* list terminator */



	{{NULL}}



};





And I add my string type arguments here, it can't work well.



When I debug, it comes to func allocateReloptStruct, at the



code line "size += optstr->fill_cb(val, NULL);", it gives me segment



fault. what else do I need to add? can you give me an example?






^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: there is no an example in reloptions.c for string?
  2022-10-31 03:24 there is no an example in reloptions.c for string? jacktby@gmail.com <jacktby@gmail.com>
@ 2022-10-31 03:48 ` David G. Johnston <david.g.johnston@gmail.com>
  0 siblings, 0 replies; 2+ messages in thread

From: David G. Johnston @ 2022-10-31 03:48 UTC (permalink / raw)
  To: jacktby@gmail.com <jacktby@gmail.com>; +Cc: pgsql-general <pgsql-general@lists.postgresql.org>

On Sun, Oct 30, 2022 at 8:24 PM jacktby@gmail.com <jacktby@gmail.com> wrote:

> t. what else do I need to add?


The stuff it mentions in the code comment in that file.  You might consider
actually showing what you did add.

can you give me an example?
>
>
Ah, the beauty of using version control, history as examples.

https://github.com/postgres/postgres/commit/66abc2608c7c00fcd449e00a9e23f13f02e65d04

David J.

^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-10-31 03:48 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 03:24 there is no an example in reloptions.c for string? jacktby@gmail.com <jacktby@gmail.com>
2022-10-31 03:48 ` David G. Johnston <david.g.johnston@gmail.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox