Re: newbie db design question

2022-06-11 Thread Rino Mardo
thank you. i have received some tips on how to approach my problem. i will be trying them out. On Sat, 11 Jun 2022, 5:51 pm Peter J. Holzer wrote: > On 2022-06-11 09:43:46 +0100, Ray O'Donnell wrote: > > On 11 June 2022 08:05:41 Rino Mardo wrote: > > really noob question here. i have this

Re: PG_GETARG_TEXT_PP vs PG_GETARG_TEXT_P

2022-06-11 Thread Tom Lane
Markur Sens writes: > On 12 Jun 2022, at 12:06 AM, Tom Lane wrote: >> PG_GETARG_TEXT_PP is preferred in new code since it can avoid one >> step of palloc-and-copy-the-value; the only real downside is you >> have to use the appropriate macros to get the string's start address >> and length. > Is

Re: PG_GETARG_TEXT_PP vs PG_GETARG_TEXT_P

2022-06-11 Thread Markur Sens
> On 12 Jun 2022, at 12:06 AM, Tom Lane wrote: > > Markur Sens writes: >> In the “Extending SQL” chapter I see both of these forms are mentioned. >> But can’t find info about when to use which one. > > PG_GETARG_TEXT_P returns a traditional-format, 4-byte-header value. > >

Re: PG_GETARG_TEXT_PP vs PG_GETARG_TEXT_P

2022-06-11 Thread Tom Lane
Markur Sens writes: > In the “Extending SQL” chapter I see both of these forms are mentioned. > But can’t find info about when to use which one. PG_GETARG_TEXT_P returns a traditional-format, 4-byte-header value. PG_GETARG_TEXT_PP is allowed to return either that or a 1-byte-header value, in

PG_GETARG_TEXT_PP vs PG_GETARG_TEXT_P

2022-06-11 Thread Markur Sens
In the “Extending SQL” chapter I see both of these forms are mentioned. But can’t find info about when to use which one.

multiple entries for synchronous_standby_names

2022-06-11 Thread Nitesh Nathani
Trying to achieve sync streaming to barman server and i need to add an entry to postgresql.conf for this parameter, which already has an entry and tried a few variations but does not work. Any ideas? Also tried '&&' but in vain synchronous_standby_names='ANY 1 (*)',barman-wal-archive log

Re: newbie db design question

2022-06-11 Thread Peter J. Holzer
On 2022-06-11 09:43:46 +0100, Ray O'Donnell wrote: > On 11 June 2022 08:05:41 Rino Mardo wrote: > really noob question here. i have this experimental database design: > > create table products ( > product_id serial primary key, > description text, > supplier_id) ; > >

Re: newbie db design question

2022-06-11 Thread Ray O'Donnell
On 11 June 2022 08:05:41 Rino Mardo wrote: hello! really noob question here. i have this experimental database design: create table products ( product_id serial primary key, description text, supplier_id) ; create table supplier ( supplier_id serial primary key, description text) ; the

Re: newbie db design question

2022-06-11 Thread Gavan Schneider
On 11 Jun 2022, at 17:05, Rino Mardo wrote: > … experimental database design: > > create table products ( > product_id serial primary key, > description text, > supplier_id) ; > > create table supplier ( > supplier_id serial primary key, > description text) ; > > … the products table should

newbie db design question

2022-06-11 Thread Rino Mardo
hello! really noob question here. i have this experimental database design: create table products ( product_id serial primary key, description text, supplier_id) ; create table supplier ( supplier_id serial primary key, description text) ; the products table should be linked to the