I have an `account` table with 5.3M rows, with primary key `id` of
type `text` (and 600+ columns if that matters).
I'm trying to create a `newaccount` table with the same schema but
600k newly imported rows, then insert all the old rows for which `id`
isn't already in the set of newly updated
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 =
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
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
gavinflo...@archidevsys.co.nzwrote:
On 03/05/13 21:19, Yuriy Rusinov wrote:
Hello, colleagues !
I have to write random number generator state into
Yang Zhang yanghates...@gmail.com writes:
The most obvious query doesn't work so hot due to repeated execution
of the subplan:
= explain insert into newaccount select * from account where id not
in (select id from account);
Yeah. Try using a NOT EXISTS instead.
This isn't a big deal as
Yuriy Rusinov yrusi...@gmail.com 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
On May 3, 2013 12:15 PM, Yang Zhang yanghates...@gmail.com wrote:
I have an `account` table with 5.3M rows, with primary key `id` of
type `text` (and 600+ columns if that matters).
I'm trying to create a `newaccount` table with the same schema but
600k newly imported rows, then insert all
Thanks a lot, I have corrected and bug was fixed.
On Fri, May 3, 2013 at 6:42 PM, Tom Lane t...@sss.pgh.pa.us wrote:
Yuriy Rusinov yrusi...@gmail.com writes:
In C-function I do
size_t nr_ins = strlen (insert into rand_state (state_rand) values
($1););
char * r_sql = (char *) palloc
I am trying to insert data from 2 columns in tableB (colX and colY) into the
same two columns of tableB, with a join like where clause. Is this possible?
For example:
INSERT INTO tableA (colX, colY)
(SELECT colX, colY
FROM tableB
WHERE
tableA.blockname = tableB.block_name
AND
-Original Message-
From: pgsql-general-ow...@postgresql.org [mailto:pgsql-general-
ow...@postgresql.org] On Behalf Of Kirk Wythers
Sent: Friday, May 03, 2013 1:51 PM
To: POSTGRES
Subject: [GENERAL] How to INSERT INTO one table from another table,
WHERE
I am trying to insert data
Guessing the answer's no, but is there any way to construct indexes
such that I can safely put them on (faster) volatile storage? (Just to
be clear, I'm asking about indexes for *logged* tables.)
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your
On 3 May 2013 21:06, Yang Zhang yanghates...@gmail.com wrote:
Guessing the answer's no, but is there any way to construct indexes
such that I can safely put them on (faster) volatile storage? (Just to
be clear, I'm asking about indexes for *logged* tables.)
Yes:
CREATE INDEX ... TABLESPACE
Yeah, I know that indexes for unlogged tables are unlogged. I was
just wondering if you could do this for logged tables. (Safely, such
that on crash recovery WAL replay won't throw up, these can be omitted
from base backups, etc.)
On Fri, May 3, 2013 at 1:46 PM, Thom Brown t...@linux.com wrote:
This weekend, we're planning to move a production cluster to a new server.
Rather than a full dump-and-restore, I want to use a base backup from last
night, have the server replay the WAL files up to the time we shutdown the
old server, and go from there. Both servers are Windows.
I've never
You can use free tool - Valentina Studio
http://www.valentina-db.com/en/valentina-studio-overview 14 Feb 2013 in the
5.0 version added support of PostgreSQL, as well as mySQL/mariaDB, SQLite.
It is FREE. Works on Mac, Win and Linux. Includes not only db management but
powerfull reports that work
15 matches
Mail list logo