Tong Michael schrieb am 26.02.2015 um 21:23:
hey, guys, I came across a merge statement when I'm trying to convert stored
procedures from Mysql to Postgres:
__ __
merge into db.ChargePeriod d
using (
select ba.ClientID
...
...
That can't be MySQL - MySQL does
On 2/26/15 2:23 PM, Tong Michael wrote:
I saw some people use with upsert as, but my pgAdmin version(1.8)
doesn't support it. Anyone has any ideas how to do merge in postgres?
Actually, this feature is in active development and will hopefully make
it into 9.5.
In the meantime, take a
hey, guys, I came across a merge statement when I'm trying to convert
stored procedures from Mysql to Postgres:
merge into db.ChargePeriod d
using (
select ba.ClientID
, ba.BillingAccountID
, bs.BillingScheduleID
, @CodeWithholdD as WithholdTypeID
from
Jeff Janes jeff.ja...@gmail.com wrote:
Neil McGuigan neilmcgui...@gmail.com wrote:
Trying to do an hourly hot incremental backup of a single postgres server
(windows).
Can you explain what incremental backup means to you? I find that
there is a surprising variety of opinions about what
On Fri, Jul 26, 2013 at 7:24 AM, Neil McGuigan neilmcgui...@gmail.com wrote:
Trying to do an hourly hot incremental backup of a single postgres server
(windows).
I have the following setup in postgresql.conf:
max_wal_senders=2
wal_level=archive
archive_mode=on
archive_command='copy %p
Hi Neil,
Il 26/07/2013 00:24, Neil McGuigan ha scritto:
Trying to do an hourly hot incremental backup of a single postgres
server (windows).
I have the following setup in postgresql.conf:
max_wal_senders=2
wal_level=archive
archive_mode=on
archive_command='copy %p c:\\postgres\\archive\\%f'
On Thu, Jul 25, 2013 at 3:24 PM, Neil McGuigan neilmcgui...@gmail.com wrote:
Trying to do an hourly hot incremental backup of a single postgres server
(windows).
Can you explain what incremental backup means to you? I find that
there is a surprising variety of opinions about what these terms
Trying to do an hourly hot incremental backup of a single postgres server
(windows).
I have the following setup in postgresql.conf:
max_wal_senders=2
wal_level=archive
archive_mode=on
archive_command='copy %p c:\\postgres\\archive\\%f'
I did a base backup with pg_basebackup -U postgres -D
I noticed in elastic search (ES), you can do queries like
a b~4
I think this query will match stuff like a b and a x x b but not
something like a x x x x x x x x b.
I'm not sure if this kind of thing is possible with postgresql full
text search. Is it possible?
I understand that I can do
something like this ?
http://www.sai.msu.su/~megera/wiki/2009-08-12
http://www.sai.msu.su/~megera/postgres/talks/algebra-fts.pdf
Unfortunately, we get no support for this work, so we stop maintaining
phrase-search patch. I even thinking about kikstarter.com to get money
for this project :)
Esmin Gracic wrote:
On Wed, May 18, 2011 at 1:25 PM, Adarsh Sharma
adarsh.sha...@orkash.com mailto:adarsh.sha...@orkash.com wrote:
Dear all,
I explain in the simple terms :
Our application stores data in a format that is not best
fitted to analyze.
_*Table news
Any update on this.
Please guide.
Adarsh Sharma wrote:
Dear all,
I explain in the simple terms :
Our application stores data in a format that is not best fitted
to analyze.
_*Table news
*_category_id Record_id field_name field_value
Dear all,
I explain in the simple terms :
Our application stores data in a format that is not best fitted
to analyze.
_*Table news
*_category_id Record_id field_name field_value
On Tue, Aug 17, 2010 at 11:02:20AM +0700, tuanhoanganh wrote:
On Sat, Aug 14, 2010 at 10:00 AM, tuanhoanganh hatua...@gmail.com wrote:
The process cannot access the file because it is being used by another
process.
C:\...\8.3\pg_xlog\00010007001B
Exclude pg_log from the backup
Can anyone answer me ?
Thanks you very much
Tuan Hoang Anh
On Sat, Aug 14, 2010 at 10:00 AM, tuanhoanganh hatua...@gmail.com wrote:
I tried to do pitr backup using Postgres 8.3.9 on windows. So I issued
SELECT pg_start_backup('test');
After I put the db in backup mode I tried to zip the data
I tried to do pitr backup using Postgres 8.3.9 on windows. So I issued
SELECT pg_start_backup('test');
After I put the db in backup mode I tried to zip the data directory files
with 7z. However I encountered the following errors:
The process cannot access the file because it is being used by
I would like to replicate the following Unix pipe within a Perl script,
perhaps using DBD::Pg:
% pg_dump -Z9 -Fc -U DB_USER FROM_DB | pg_restore -v -d TO_DB -p
SSH_TUNNEL_PORT -h localhost -U DB_USER
Of course, I can try to use Perl's system, and the like, to run this pipe
verbatim, but I this
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
I would like to replicate the following Unix pipe within a Perl script,
perhaps using DBD::Pg:
% pg_dump -Z9 -Fc -U DB_USER FROM_DB | pg_restore -v -d TO_DB -p
SSH_TUNNEL_PORT -h localhost -U DB_USER
Of course, I can try to use Perl's
On Mon, 2010-05-10 at 17:33 +, Greg Sabino Mullane wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
I would like to replicate the following Unix pipe within a Perl script,
perhaps using DBD::Pg:
% pg_dump -Z9 -Fc -U DB_USER FROM_DB | pg_restore -v -d TO_DB -p
On Mon, May 10, 2010 at 1:33 PM, Greg Sabino Mullane g...@turnstep.comwrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
I would like to replicate the following Unix pipe within a Perl script,
perhaps using DBD::Pg:
% pg_dump -Z9 -Fc -U DB_USER FROM_DB | pg_restore -v -d
On Mon, May 10, 2010 at 2:59 PM, Joshua D. Drake j...@commandprompt.comwrote:
On Mon, 2010-05-10 at 17:33 +, Greg Sabino Mullane wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
I would like to replicate the following Unix pipe within a Perl script,
perhaps using
Kynn Jones kyn...@gmail.com writes:
But I have not found a way for my script to provide a password when it
runs commands like dropdb, createdb, and pg_restore with the -h REMOTE
HOST flag. So I end up resorting to SSH-tunneling. This is what I'm
trying to avoid.
You don't really want to
Kynn Jones kyn...@gmail.com writes:
Actually, that was a mistake on my part. That should have been -Ft rather
than -Z9 -Fc, since I *don't* want compression (most of the data being
transmitted consists of highly incompressible blobs anyway). Regarding SSH,
my understanding is that to get
On 5/10/2010 2:46 PM, Kynn Jones wrote:
On Mon, May 10, 2010 at 1:33 PM, Greg Sabino Mullane g...@turnstep.com
mailto:g...@turnstep.com wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
I would like to replicate the following Unix pipe within a Perl
script,
Yi Zhao wrote:
ok, thanks, I will create a new message when I post next time.
And it's nice to reply below the original message, after cutting off the
bits that don't matter anymore. It saves space and makes your messages
easier for other people to read, which means you are more likely to
In response to Yi Zhao :
ok, thanks, I will create a new message when I post next time.
about my question, I think distinct can't solve my problem, because I
want to get more than one rows. if there is more than (or equal) 2 (eg:
2, 3, 4, 100 ...)rows have the same value of column 'b' , I
hi, all, I have a table in postgresql which have 2 columns like this:
a|b
--
X A
X A
Y A
D B
H B
E B
D B
P C
when I do select and order by, I got this:
a | b
---+---
X | A
X | A
Y | A
D | B
H | B
| B
D | B
P | C
I want to get the only 2 rows(limit or random) if the column b have
Yi Zhao wrote:
I want to get the only 2 rows(limit or random) if the column b have
the same value. so, the result of the above is
a | b
---+---
X | A
X | A
D | B
H | B
P | C
how to do that, thanks all!
I don't understand what you want based on your description and your
example results.
thanks Ringer.
my mean is that:
I want less than 2 rows which have the same value of column b!
for example, there is 3 columns have the same value A,
X | A
X | A
Y | A
I want my result have two of them.
thanks.
On Thu, 2009-02-19 at 15:49 +0900, Craig Ringer wrote:
Yi Zhao wrote:
I want
In response to Craig Ringer :
I don't understand what you want based on your description and your
example results. What do you mean by if the column `b' have the same
value ?
Additionally, don't hijack other threads by answer to an old message and
changing the subject. Your eMails contains a
Yi Zhao wrote:
thanks Ringer.
my mean is that:
I want less than 2 rows which have the same value of column b!
for example, there is 3 columns have the same value A,
X | A
X | A
Y | A
I want my result have two of them.
Less than two? ie just one? That's easy:
test=# SELECT DISTINCT ON (b)
In response to Yi Zhao :
thanks Ringer.
my mean is that:
I want less than 2 rows which have the same value of column b!
for example, there is 3 columns have the same value A,
X | A
X | A
Y | A
I want my result have two of them.
I think, you are searching for DISTINCT:
test=# create
ok, thanks, I will create a new message when I post next time.
about my question, I think distinct can't solve my problem, because I
want to get more than one rows. if there is more than (or equal) 2 (eg:
2, 3, 4, 100 ...)rows have the same value of column 'b' , I want to get
only 2 rows. if
On Jan 26, 2009, at 2:09 PM, Phoenix Kiula wrote:
I wonder if this is an SQL limitation or something I'm missing in the
PG manual, but I need to run an update on my database (to replace the
value of a column to match a new design structure).
Easiest is probably to add a new column for the
I wonder if this is an SQL limitation or something I'm missing in the
PG manual, but I need to run an update on my database (to replace the
value of a column to match a new design structure).
Due to the new business logic, the replaced value of a field may end
up being already present in the
On Mon, Jan 26, 2009 at 2:09 PM, Phoenix Kiula phoenix.ki...@gmail.com wrote:
I wonder if this is an SQL limitation or something I'm missing in the
PG manual, but I need to run an update on my database (to replace the
value of a column to match a new design structure).
Due to the new business
On Mon, Jan 26, 2009 at 9:45 PM, Matthias Karlsson matth...@yacc.se wrote:
On Mon, Jan 26, 2009 at 2:09 PM, Phoenix Kiula phoenix.ki...@gmail.com
wrote:
I wonder if this is an SQL limitation or something I'm missing in the
PG manual, but I need to run an update on my database (to replace the
On Mon, Jan 26, 2009 at 2:53 PM, Phoenix Kiula phoenix.ki...@gmail.com wrote:
On Mon, Jan 26, 2009 at 9:45 PM, Matthias Karlsson matth...@yacc.se wrote:
On Mon, Jan 26, 2009 at 2:09 PM, Phoenix Kiula phoenix.ki...@gmail.com
wrote:
I wonder if this is an SQL limitation or something I'm missing
In response to Tom Lane [EMAIL PROTECTED]:
Bill Moran [EMAIL PROTECTED] writes:
Just an FYI ... I remembered what prompted the cron job.
We were seeing significant performance degradation. I never did actual
measurements, but it was on the order of Bill, why is restoring taking
such a
immediately by telephone or email and destroy the original
message without making a copy. Thank you.
- Original Message -
From: Bill Moran [EMAIL PROTECTED]
To: Tom Lane [EMAIL PROTECTED]
Cc: pgsql-general@postgresql.org
Sent: Thursday, April 19, 2007 9:33 AM
Subject: Re: [GENERAL] How
In response to Tom Lane [EMAIL PROTECTED]:
Bill Moran [EMAIL PROTECTED] writes:
Just an FYI ... I remembered what prompted the cron job.
We were seeing significant performance degradation. I never did actual
measurements, but it was on the order of Bill, why is restoring taking
such a
On Wed, 2007-02-28 at 09:17 -0800, Joshua D. Drake wrote:
Bill, you are right but I believe Jim was speaking from a general
perspective. Generally speaking you should not have to reindex, or if
you do very rarely.
I too have a couple of databases we manage that require a reindex more
often
Jeff Davis [EMAIL PROTECTED] writes:
Isn't a REINDEX still needed in the case of monotonically increasing
keys, such as in a sequence or timestamp index? I also delete tuples, so
that results in a forward-shifting range of keys.
No, that shouldn't be a problem, if you're maintaining a constant
On Fri, 2007-03-02 at 16:39 -0500, Tom Lane wrote:
Jeff Davis [EMAIL PROTECTED] writes:
Isn't a REINDEX still needed in the case of monotonically increasing
keys, such as in a sequence or timestamp index? I also delete tuples, so
that results in a forward-shifting range of keys.
No, that
On Feb 28, 2007, at 5:35 PM, Bill Moran wrote:
Just an FYI ... I remembered what prompted the cron job.
We were seeing significant performance degradation. I never did
actual
measurements, but it was on the order of Bill, why is restoring
taking
such a long time? from other systems
Bill Moran [EMAIL PROTECTED] writes:
Just an FYI ... I remembered what prompted the cron job.
We were seeing significant performance degradation. I never did actual
measurements, but it was on the order of Bill, why is restoring taking
such a long time? from other systems people. At the
This select doesn't return any row. What does it mean ?
Ezequias.
2007/2/27, Jim C. Nasby [EMAIL PROTECTED]:
On Tue, Feb 27, 2007 at 11:26:02AM -0800, Dhaval Shah wrote:
I am planning to use 8.2 and the average inserts/deletes and updates
across all tables is moderate. That is, it is a
In response to Ezequias Rodrigues da Rocha [EMAIL PROTECTED]:
2007/2/27, Jim C. Nasby [EMAIL PROTECTED]:
On Tue, Feb 27, 2007 at 11:26:02AM -0800, Dhaval Shah wrote:
I am planning to use 8.2 and the average inserts/deletes and updates
across all tables is moderate. That is, it is a
Bill Moran wrote:
In response to Ezequias Rodrigues da Rocha [EMAIL PROTECTED]:
2007/2/27, Jim C. Nasby [EMAIL PROTECTED]:
On Tue, Feb 27, 2007 at 11:26:02AM -0800, Dhaval Shah wrote:
I am planning to use 8.2 and the average inserts/deletes and updates
across all tables is moderate. That is,
Bill Moran [EMAIL PROTECTED] writes:
I don't agree. I think that regular indexing is mandatory under some
workloads. Example:
...
There are some additional indexes that I've snipped from the output that also
saw some benefit from reindexing, but let's just focus on file_fp_idx.
Can you
In response to Joshua D. Drake [EMAIL PROTECTED]:
Bill Moran wrote:
In response to Ezequias Rodrigues da Rocha [EMAIL PROTECTED]:
2007/2/27, Jim C. Nasby [EMAIL PROTECTED]:
On Tue, Feb 27, 2007 at 11:26:02AM -0800, Dhaval Shah wrote:
I am planning to use 8.2 and the average
In response to Tom Lane [EMAIL PROTECTED]:
Bill Moran [EMAIL PROTECTED] writes:
I don't agree. I think that regular indexing is mandatory under some
workloads. Example:
...
There are some additional indexes that I've snipped from the output that
also
saw some benefit from
Bill Moran [EMAIL PROTECTED] writes:
In response to Tom Lane [EMAIL PROTECTED]:
Can you describe the usage pattern of that index? I'm curious why it
doesn't maintain reasonably static size. How often is the underlying
table vacuumed?
...
There are 21 jobs, each ranging in size from 2000 -
In response to Tom Lane [EMAIL PROTECTED]:
Bill Moran [EMAIL PROTECTED] writes:
In response to Tom Lane [EMAIL PROTECTED]:
Can you describe the usage pattern of that index? I'm curious why it
doesn't maintain reasonably static size. How often is the underlying
table vacuumed?
...
In response to Tom Lane [EMAIL PROTECTED]:
Bill Moran [EMAIL PROTECTED] writes:
In response to Tom Lane [EMAIL PROTECTED]:
Can you describe the usage pattern of that index? I'm curious why it
doesn't maintain reasonably static size. How often is the underlying
table vacuumed?
...
I am planning to use 8.2 and the average inserts/deletes and updates
across all tables is moderate. That is, it is a moderate sized
database with moderate usage of tables.
Given that, how often do I need to reindex the tables? Do I need to do
it everyday?
Also with 8.2, I do not have to do
On Tue, Feb 27, 2007 at 11:26:02AM -0800, Dhaval Shah wrote:
I am planning to use 8.2 and the average inserts/deletes and updates
across all tables is moderate. That is, it is a moderate sized
database with moderate usage of tables.
Given that, how often do I need to reindex the tables? Do I
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 02/27/07 13:26, Dhaval Shah wrote:
I am planning to use 8.2 and the average inserts/deletes and updates
across all tables is moderate. That is, it is a moderate sized
database with moderate usage of tables.
Moderate?
-BEGIN PGP
Junkone wrote:
CREATE TABLE SYMBOL
(
SYMBOL_ID int4 NOT NULL,
SYMBOL2EXCHANGE int2 NOT NULL,
SYMBOL_ALIAS text[],
RELATED_SYMBOLS_OTHER_EXCHANGES int8[],
SYMBOL_NAME text,
COMPANY_NAME text,
SYMBOL2SECTOR int2,
SYMBOL2INDUSTRY int4,
STOCK_SUMMARY text
)
I think you'll want
Junkone wrote:
HI
I have a simple table created using PGAdmin III. How do i do a auto
numbering on a column SYMBOL_ID?
My table is
CREATE TABLE SYMBOL
(
SYMBOL_ID int4 NOT NULL,
SYMBOL2EXCHANGE int2 NOT NULL,
SYMBOL_ALIAS text[],
RELATED_SYMBOLS_OTHER_EXCHANGES int8[],
SYMBOL_NAME
HI
I have a simple table created using PGAdmin III. How do i do a auto
numbering on a column SYMBOL_ID?
My table is
CREATE TABLE SYMBOL
(
SYMBOL_ID int4 NOT NULL,
SYMBOL2EXCHANGE int2 NOT NULL,
SYMBOL_ALIAS text[],
RELATED_SYMBOLS_OTHER_EXCHANGES int8[],
SYMBOL_NAME text,
HI
I have a simple table created using PGAdmin III. How do i do a auto
numbering on a column SYMBOL_ID?
My table is
CREATE TABLE SYMBOL
(
SYMBOL_ID int4 NOT NULL,
SYMBOL2EXCHANGE int2 NOT NULL,
SYMBOL_ALIAS text[],
RELATED_SYMBOLS_OTHER_EXCHANGES int8[],
SYMBOL_NAME text,
COMPANY_NAME
Terry Lee Tucker [EMAIL PROTECTED] wrote:
Joseph Brenner [EMAIL PROTECTED] wrote:
Joseph Brenner wrote:
After you do a CREATE DATABASE, how do you programatically
connect to what you just created?
It's not a terribly major point, I'm just wondering if it's true that
there's
On Sun, Jun 04, 2006 at 02:24:32PM -0700, Joseph Brenner wrote:
I think there are two different connects we're talking about here,
one is the connection to the postgresql, the other is the connection
to the database (i.e. the dbname, which probably should've been
called the catalog).
My
On Saturday 03 June 2006 04:07 am, Joseph Brenner [EMAIL PROTECTED]
thus communicated:
--
-- Joshua D. Drake [EMAIL PROTECTED] wrote:
--
-- Joseph Brenner wrote:
--
-- After you do a CREATE DATABASE, how do you programatically
-- connect to what you just created?
--
-- In the psql
On Sat, 3 Jun 2006 04:36:59 -0400 Terry Lee Tucker [EMAIL PROTECTED] thought
long, then sat down and wrote:
On Saturday 03 June 2006 04:07 am, Joseph Brenner [EMAIL PROTECTED]
thus communicated:
--
-- Joshua D. Drake [EMAIL PROTECTED] wrote:
--
-- Joseph Brenner wrote:
--
-- After
After you do a CREATE DATABASE, how do you programatically
connect to what you just created?
In the psql monitor, you'd use the \c command.
If the DATABASE already exists when you connect to postgresql,
you use the name when you connect (e.g. dbname=...).
I'm getting the impression I
Joseph Brenner wrote:
After you do a CREATE DATABASE, how do you programatically
connect to what you just created?
In the psql monitor, you'd use the \c command.
If the DATABASE already exists when you connect to postgresql,
you use the name when you connect (e.g. dbname=...).
I'm
mmm... I don't understand. The query brings a resultset just like the one you asked.
When you say that 'there's no guarantee that A field is sorted or unique...', what do you mean? The query doesn't care about the A field, it just needs UID to be a candidate key.
And I still don't
On Wed, 2003-07-30 at 07:17, Robert Partyka wrote:
Hi,
Have question
How to do such like this:
I have: select column list form tables where where statement;
how to make one column be row numbers in result?
and second one:
have select like above and I know that in result is
On 1 Aug 2003 at 9:47, Ron Johnson wrote:
On Wed, 2003-07-30 at 07:17, Robert Partyka wrote:
Hi,
Have question
How to do such like this:
I have: select column list form tables where where statement;
how to make one column be row numbers in result?
select oid,name from a;
Hi,
I want to do the following:
snip>
create function ...
as
...
BEGIN
FOR myrec INselect distinct id from table where condition
LOOP
ENDLOOP;
END;
Now this doesn't work because the FORINstatment expects
a complete record. How to deal with this ?
Tried CURSOR but that led to errors too.
Hi there,
I tried all I could think of with the following problem, perhaps
someone has another idea.
I have a table where for each id there may (and often are) multiple
rows with some kind of priority.
create table data ( id1 int4, id2 int4, lots of data, prio int4 );
The minimal priority is
73 matches
Mail list logo