Hi
I have code in our "run this query" shim that automatically attempts
to reconnect to the server if it finds that the connection is bad
(usually it's just there to handle unexpected postmaster restarts).
while (PQstatus(Conn) == CONNECTION_BAD) {
fprintf(stderr, "postgres connection
I wrote:
> I'm guessing (from "incomplete startup packet") that the connection
> created by the new thread never actually succeeded, is that the
> problem? Will PQreset only work on a connection that had previously
> connected successfully?
And as soon as I hit "send" on this email light dawned: t
G'day Tom,
Thanks for the feedback. I couldn't find anywhere that suggested that I had
set the CPPFLAGS or CFLAGS environment variables, so I removed the
following lines from my profile:
#export USE_PGXS=1
#export PG_LIB_DIR="/usr/local/pgsql/lib"
#export PG_CONFIG="/usr/local/pgsql/bin/pg_config
to clarify, I commented them out, hence the # - it wasn't that I removed
lines that were already commented out :)
On 25 October 2017 at 22:21, Ben Madin wrote:
> G'day Tom,
>
> Thanks for the feedback. I couldn't find anywhere that suggested that I
> had set the CPPFLAGS or CFLAGS environment va
I have a composite type like this, for example:
create type mytype(a text, b text, c text);
and a table
create table t_cols(a text,b text,c text);
containing some data. I have a table with my composite type:
create table t_composite(data_comp mytype);
and loaded data into it like so:
insert
Celia McInnis writes:
> My first question is: HOW do I populate this table, at first with arrays
> containing one element from the t_composite table?
> I have tried various things with no success.
You didn't say what you tried, but I imagine it was something like
regression=# insert into t_array
Thanks Tom - I saw how to do that for specified data, but I want to select
the elements from a table of composite and don't know how to do that. I
can't do insertions manually of each row separately! So how do I get
material from my table of composite values into my table of array values?
I am run
I have a query I cannot tame and I'm wondering if there's an alternative
to the "between" clause I'm using. Perhaps a custom type could do
better? I've tried the "<@" orperator and that changes the query plan
significantly but the execution cost/time is not improved.
Any suggestion or p
Got it, finally...
insert into t_array select array[row((data_comp).*)::mytype[] from
t_composite;
I'm not sure why I need (data_comp).* rather than some of the other things
that I tried and failed with...
On Wed, Oct 25, 2017 at 3:47 PM, Tom Lane wrote:
> Celia McInnis writes:
> > My first q
On Wed, Oct 25, 2017 at 2:16 PM, Celia McInnis
wrote:
> Got it, finally...
>
> insert into t_array select array[row((data_comp).*)::mytype[] from
> t_composite;
>
> I'm not sure why I need (data_comp).* rather than some of the other things
> that I tried and failed with...
>
>
The unusual set o
"David G. Johnston" writes:
> On Wed, Oct 25, 2017 at 2:16 PM, Celia McInnis
>> Got it, finally...
>> insert into t_array select array[row((data_comp).*)::mytype[] from
>> t_composite;
>>
>> I'm not sure why I need (data_comp).* rather than some of the other things
>> that I tried and failed wit
Yes, thanks - that's nicer - I am now using:
insert into t_array select array[data_comp]::mytype[] from t_composite;
On Wed, Oct 25, 2017 at 5:25 PM, Tom Lane wrote:
> "David G. Johnston" writes:
> > On Wed, Oct 25, 2017 at 2:16 PM, Celia McInnis
> >> Got it, finally...
> >> insert into t_a
12 matches
Mail list logo