In response to ? :
How can I do a moving avg by only using SQL?
Which version do you have? Since 8.4 we have CTE aka windowing
functions, a simple axample:
test=*# select n, last_value(n) over mywin , avg(n) over mywin
from generate_series(1,20) n
window mywin as (partition by
Hi,
Does anyone know if there is any N + 1 replication for Postgres?
Could someone please point me to the right direction?
I would build up a multimaster-cluster with the common software like
Bucardo, PgPool, PgCLuster or Sequoia and connect it with Slony-I +
Heartbeat.
--
Greetings,
Robert
Hi,
Tom Lane t...@sss.pgh.pa.us writes:
Just out of curiosity, does anyone know of any ORM anywhere that doesn't
suck? They seem to be uniformly awful, at least in terms of their
interfaces to SQL databases. If there were some we could recommend,
maybe people would be less stuck with these
Hi,
I want to copy a table say employeedetails from employee
database to library database. Can you help me giving the
detailed steps to do this.
Thanks And Regards,
Rekha.
--
Rekha Pai
Senior Software Consultant
Andy Colson wrote:
Kevin McConnell wrote:
I think you could also do something roughly similar in a statement by
using a RETURNING clause on the update, such as:
update msg set busy = true where id = (select min(id) from msg where
busy = false) returning *;
I had thought of that, but you'd
In response to Rekha Ravi Pai :
Hi,
I want to copy a table say employeedetails from employee
database to library database. Can you help me giving the
detailed steps to do this.
pg_dump -t insert the table-name insert the source-db | psql insert
destination db
In you case:
pg_dump -t
Hi,
When I tried to add the following index, I get some strange error. Does
anyone know what these errors mean and how to fix it?
Here is the index query:
create index idx_product_items_digits on product_items using gist (digits
gist_prefix_range_ops,product_id)
Here is the error:
NOTICE:
On 3 Sep 2009, at 23:11, Christopher Condit wrote:
I have two tables that are georeferenced (although in this case I'm
not using PostGIS) that I need to join.
A ( lat | lon | depth | value)
|A| = 1,100,000
B ( lat | lon | attributes)
|B| = 14,000,000
A is a special case because the lat /
In response to Christopher Condit con...@sdsc.edu:
I have two tables that are georeferenced (although in this case I'm
not using PostGIS) that I need to join.
A ( lat | lon | depth | value)
|A| = 1,100,000
B ( lat | lon | attributes)
|B| = 14,000,000
A is a special case
On Fri, Sep 04, 2009 at 05:42:31PM +0800, Juan Backson wrote:
When I tried to add the following index, I get some strange error. Does
anyone know what these errors mean and how to fix it?
Here is the index query:
create index idx_product_items_digits on product_items using gist (digits
Hello,
Is it possible to perform selects in a where clause of a statement?
Given a statement as follows:
SELECT foo.foo_id, foo.name
FROM foo, bar
WHERE foo.bar_id = bar.bar_id
AND bar.name = 'martini';
I'm looking for a way to recast it so that the select and from clauses
Hi,
Steve Atkins st...@blighty.com writes:
On Sep 3, 2009, at 11:30 AM, Mark Lubratt wrote:
Or, does someone know of another way to get the
backend to send an email?
Have a queue table in the database you put your emails into and an external
process that polls the table, sends the email
Gordon Shannon escribió:
Hello, running 8.4 on Centos. Been running production for 6 months. Never
saw this message until tonight:
LOG: could not truncate directory pg_multixact/offsets: apparent
wraparound
My caffeing level is too low yet to know for sure, but I think this is
Hi,
There is a question in the german pg-forum:
It is possible to add a comment on a constraint, but \dd doesn't display
that comment. There is also a old question in this mailing-list without
an answer:
http://archives.postgresql.org/pgsql-general/2003-07/msg01448.php
I think, this is a bug,
Andreas Kretschmer akretsch...@spamfence.net wrote:
There is a question in the german pg-forum:
It is possible to add a comment on a constraint, but \dd doesn't display
that comment. There is also a old question in this mailing-list without
an answer:
On 4 Sep 2009, at 15:47, Scott Frankel wrote:
Hello,
Is it possible to perform selects in a where clause of a statement?
Given a statement as follows:
SELECT foo.foo_id, foo.name
FROM foo, bar
WHERE foo.bar_id = bar.bar_id
AND bar.name = 'martini';
I've explored the where
Wow, do I feel stupid now! After creating the database, 15 tables and a
trigger using the same exact process, I somehow overlooked adding the spaces
to the front of each line. %-|
Thanks, that worked great! I guess I stared at the code too long to see it.
acordner wrote:
I have been
On Fri, Sep 4, 2009 at 9:47 AM, Scott Frankellekn...@pacbell.net wrote:
Hello,
Is it possible to perform selects in a where clause of a statement?
Given a statement as follows:
SELECT foo.foo_id, foo.name
FROM foo, bar
WHERE foo.bar_id = bar.bar_id
AND bar.name = 'martini';
What would be the best way to verify that a PITR came up with *all*
the expected data?
This is mostly for a controlled failover, where I manually bring down
the primary server, and shouldn't ever lose a transaction.
If I need to use something like txid_current(), how do I ensure that
it's the
On Fri, 2009-09-04 at 08:03 +0200, A. Kretschmer wrote:
Which version do you have? Since 8.4 we have CTE aka windowing
functions, a simple axample:
Minor terminology correction:
CTE stands for Common Table Expression, i.e. WITH [RECURSIVE].
Regards,
Jeff Davis
--
Sent via
On Fri, Sep 04, 2009 at 06:47:24AM -0700, Scott Frankel wrote:
Hello,
Is it possible to perform selects in a where clause of a statement?
Given a statement as follows:
SELECT foo.foo_id, foo.name
FROM foo, bar
WHERE foo.bar_id = bar.bar_id
AND bar.name = 'martini';
I'm
Hello,
Is it possible to perform selects in a where clause of a statement?
Given a statement as follows:
SELECT foo.foo_id, foo.name
FROM foo, bar
WHERE foo.bar_id = bar.bar_id
AND bar.name = 'martini';
I'm looking for a way to recast it so that the select and from clauses
Tom Lane t...@sss.pgh.pa.us writes:
Just out of curiosity, does anyone know of any ORM anywhere that doesn't
suck? They seem to be uniformly awful, at least in terms of their
interfaces to SQL databases. If there were some we could recommend,
maybe people would be less stuck with these bogus
Shakil Shaikh wrote:
I tried installing this but am now getting the following error when
trying to install plperl:
ERROR: could not access file $libdir/plperl: No such file or directory
Apparently this means that the version of Postgresql I have wasn't
compiled with support for plperl.
From: Alvaro Herrera alvhe...@commandprompt.com
Remove that, and install them from Martin Pitt's repository:
https://launchpad.net/~pitti/+archive/postgresql
The one-click installer does not integrate well with the platform.
Avoid using them.
Hi, thanks for the tip.
I tried installing this
Josef Wolf j...@raven.inka.de writes:
pg_ctl -Ddb -o -h '' -k `pwd`/db -l postgreslog start
This works, but when I add the -w option, it waits all the 60 seconds.
I don't believe pg_ctl is smart enough to dredge the -k option out of -o
and figure out that it has to look there for the socket.
hubert depesz lubaczewski dep...@depesz.com writes:
On Fri, Sep 04, 2009 at 05:42:31PM +0800, Juan Backson wrote:
When I tried to add the following index, I get some strange error. Does
anyone know what these errors mean and how to fix it?
Here is the index query:
create index
you'll need to create an alias beforehand
SELECT foo.foo_id, foo.name
FROM foo, (SELECT * FROM foo, bar WHERE ...) bar
WHERE foo.bar_id = bar.bar_id
AND bar.name = 'martini';
Martin Gainty
__
Verzicht und Vertraulichkeitanmerkung/Note de déni et de
Hello,
I'm working on setting up a full-text search for some descriptions
stored in my database. I'm running pg 8.4.
From what I can tell, there are two functions. One function,
to_tsquery(), requires that boolean operators (, |, !) are between
every word. The other function, plainto_tsquery()
I have two tables that are georeferenced (although in this case
I'm
not using PostGIS) that I need to join.
A ( lat | lon | depth | value)
|A| = 1,100,000
B ( lat | lon | attributes)
|B| = 14,000,000
A is a special case because the lat / lon values are all at
APseudoUtopia,
you invented your own query language, so you should write your own
function, which transforms user's query to ::tsquery, if to_tsquery()
and plainto_tsquery() doesn't satisfy your input language.
Notice, that phrase search will be able only in 8.5 version.
Oleg
On Fri, 4
Hey Folks,
We are trying to integrate postgres with our product. Integrating
installation process with our installer, so for setting up password for
superuser there is an option in initdb to prompt a person who is
running initdb for password. Or other option is to provide password from
thanks tim. will read up on rank() and pl/pgsql.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
33 matches
Mail list logo