Re: If there a bug in the psql or just a feature . - Mailing list pgsql-hackers

From Tom Lane
Subject Re: If there a bug in the psql or just a feature .
Date
Msg-id 19680.1031670642@sss.pgh.pa.us
Whole thread Raw
In response to If there a bug in the psql or just a feature .  (Vanmunin Chea <vac@cse.unsw.EDU.AU>)
Responses Re: If there a bug in the psql or just a feature .  (Vanmunin Chea <vac@cse.unsw.EDU.AU>)
List pgsql-hackers
Vanmunin Chea <vac@cse.unsw.EDU.AU> writes:
> // This one is not working
> typedef struct Myindex {
>     double *indexes;
>     int level;
>     int size;
> } Myindex

You cannot use a pointer inside a Postgres datatype.  The system will
have no idea that the pointer is there and so will not copy the
pointed-to data, nor update the pointer, when the datum is copied,
stored on disk, etc.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Rule updates and PQcmdstatus() issue
Next
From: Stephan Szabo
Date:
Subject: Re: Rule updates and PQcmdstatus() issue