On Thu, Mar 5, 2009 at 11:25 PM, Christian Schröder wrote:
> Hi list,
> if I want to find all records from a table that don't have a matching record
> in another table there are at least two ways to do it: Using a left outer
> join or using a subselect. I always thought that the planner would crea
If you're going to truncate the NOW(), just go with CURRENT_DATE instead.
Thanks for the "CURRENT_DATE" tip, Adam. Works fine!
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
>
>
> > This query makes little sense. Why are you trying to convert a
> > timestamp to a timestamp? Is this a bizarre substitute for
> date_trunc()?
>
> The "from_datetime" column is of type "timestamp" but I want to check
> only the date, not the time.
> In this example I want to retrieve al
>
>
> > OK, so you want to see if a timestamp is greater than now()? Why not
> > just compare them?
> >
> > where a.from_datetime >= now()
>
> No, not the whole timestamp. I dont want to check the time.
> So I had to truncate the datetime with:
>
> date_trunc('day', a.from_datetime) >= date_tr
On Thu, Mar 5, 2009 at 11:59 PM, Nico Grubert wrote:
>
>> OK, so you want to see if a timestamp is greater than now()? Why not
>> just compare them?
>>
>> where a.from_datetime >= now()
>
> No, not the whole timestamp. I dont want to check the time.
> So I had to truncate the datetime with:
>
> d
On Thu, Mar 5, 2009 at 11:58 PM, Nico Grubert wrote:
>
>> This query makes little sense. Why are you trying to convert a
>> timestamp to a timestamp? Is this a bizarre substitute for date_trunc()?
>
> Got it:
> Thanks for the "date_trunc" tip.
>
> This query works fine:
> date_trunc('day', a.fro
OK, so you want to see if a timestamp is greater than now()? Why not
just compare them?
where a.from_datetime >= now()
No, not the whole timestamp. I dont want to check the time.
So I had to truncate the datetime with:
date_trunc('day', a.from_datetime) >= date_trunc('day', NOW())
--
Sent
Or use date_trunc:
select * from sometable where timestampfield >= date_trunc('day',now());
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
This query makes little sense. Why are you trying to convert a
timestamp to a timestamp? Is this a bizarre substitute for date_trunc()?
Got it:
Thanks for the "date_trunc" tip.
This query works fine:
date_trunc('day', a.from_datetime) >= date_trunc('day', NOW())
--
Sent via pgsql-general m
On Thu, Mar 5, 2009 at 11:53 PM, Nico Grubert wrote:
>
>> This query makes little sense. Why are you trying to convert a
>> timestamp to a timestamp? Is this a bizarre substitute for date_trunc()?
>
> The "from_datetime" column is of type "timestamp" but I want to check only
> the date, not the
This query makes little sense. Why are you trying to convert a
timestamp to a timestamp? Is this a bizarre substitute for date_trunc()?
The "from_datetime" column is of type "timestamp" but I want to check
only the date, not the time.
In this example I want to retrieve all records whose "fr
I've 2 installation of the same application.
Each one has it's own DB with the same structure and different data.
create table A ();
create table B ();
create table C ();
Now for each DB I'm going to move most of the tables in a different
schema:
DB1
alter table A set schema XXX;
alter table B se
Hi list,
if I want to find all records from a table that don't have a matching
record in another table there are at least two ways to do it: Using a
left outer join or using a subselect. I always thought that the planner
would create identical plans for both approaches, but actually they are
q
On Thu, Mar 5, 2009 at 5:56 PM, Sathish Duraiswamy
wrote:
> Thanks for ur reply John
>
> For information , We have Novell SuSe 11.0 server ON x86_32 and we have
> installed from source code
Then all you need to do is run ./configure with the same --prefix
switch as you did before, and then make ;
On Thu, Mar 5, 2009 at 5:50 AM, paulo matadr wrote:
> I need to procedure to kill users in idle,anybody have this made?
> thanks
> Paulo Moraes
Here's a really primitive bash script to kill off all idle
connections. Run it as postgres:
#!/bin/bash
for i in `psql -U postgres -t -c "select procpi
Hi,
Use "\pset footer [on|off]".
test=# select 1 as "Col1";
Col1
--
1
(1 row)
test=#
test=# \pset footer
Default footer is off.
test=#
test=# select 1 as "Col1";
Col1
--
1
test=# \pset footer
Default footer is on.
test=#
test=#
test=# select 1 as "Col1";
Col1
--
1
(
On Thu, Mar 5, 2009 at 9:31 AM, Joshua Tolley wrote:
> On Thu, Mar 05, 2009 at 04:50:09AM -0800, paulo matadr wrote:
>> I need to procedure to kill users in idle,anybody have this made?
>> thanks
>
> See pg_cancel_backend.
> http://www.postgresql.org/docs/8.3/static/functions-admin.html
I j
On Thu, Mar 05, 2009 at 09:44:58AM -0500, Douglas J Hunley wrote:
> On Wednesday 04 March 2009 15:39:36 Mark Styles wrote:
> > On Tue, Mar 03, 2009 at 09:38:39PM -0500, Douglas J Hunley wrote:
> > > I really wanted to let everyone know that I've created @PGSQL_Announce on
> > > Twitter and setup a
Mark Styles wrote:
On Tue, Mar 03, 2009 at 09:38:39PM -0500, Douglas J Hunley wrote:
I really wanted to let everyone know that I've created @PGSQL_Announce on
Twitter and setup a cron job to parse the feed and post it to Twitter.
It's been working for a little while now and I think it's stable
Thanks for your reply.
Can we have script in cron jobs to do this step periodically
If possible , can anyone help for cron script to do this job .
Regards
sathish
On Fri, Mar 6, 2009 at 1:21 AM, Joshua D. Drake wrote:
> On Fri, 2009-03-06 at 01:09 +0530, Sathish Duraiswamy wrote:
> > Can we a
Thanks for ur reply John
For information , We have Novell SuSe 11.0 server ON x86_32 and we have
installed from source code
Regards
sathish
On Fri, Mar 6, 2009 at 1:46 AM, John R Pierce wrote:
> Sathish Duraiswamy wrote:
>
>> hai
>>
>> Recently we migrated our database from 8.2.4 to 8.2.12 , w
Pierre Racine wrote:
Hi,
Is there a way to tell PostgreSQL to keep only one instance of
postgres.exe running?
you couldn't use it if that was the case. at a minimum, there is the
postmaster process, the postgres writer, the postgres logger, the
postgres stats collector, and the postgre
On Thu, Mar 5, 2009 at 2:52 PM, Pierre Racine
wrote:
> Hi,
>
> Is there a way to tell PostgreSQL to keep only one instance of
> postgres.exe running?
Running it in single user non-server mode?
Is there some reason you're looking to do this?
--
Sent via pgsql-general mailing list (pgsql-general
Hi,
Is there a way to tell PostgreSQL to keep only one instance of
postgres.exe running?
Thanks,
Pierre
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
On Thu, 5 Mar 2009, Guido Ostkamp wrote:
Would this work or is there a special reason why the original check was done
with lock held?
http://en.wikipedia.org/wiki/Race_condition
Until you have a lock on a buffer header, you can't trust that you're even
seeing consistent information about it.
Guido Ostkamp writes:
> Would this work or is there a special reason why the original check was
> done with lock held?
This will fail, very nastily, on multiple-CPU machines with weak memory
ordering guarantees. You can't assume you are seeing an up-to-date
value of the flag bit if you don't ta
On Thu, Mar 5, 2009 at 12:29 PM, Steve Atkins wrote:
>
> On Mar 5, 2009, at 11:17 AM, Richard Greenwood wrote:
>
>> Hello pgsql listers,
>>
>> I've got a problem that is similar to, but I don't think identical to,
>> a cross tab query. My data looks like:
>> ID | CAT
>> 1 | A
>> 1 | B
>>
On Thu, Mar 5, 2009 at 12:27 PM, wrote:
> Have you tried using "group by"?
Thanks, but that doesn't do it. If I group by ID I loose the CAT,
group by CAT I loose the ID, group by bith and that's just the base
table. Am I missing something?
Regards,
Rich
>> Hello pgsql listers,
>>
>> I've got a
Hello,
Bruce Momjian is with us for some training sessions this week and has
asked me to post the following question to the mailing list (I have chosen
this list as it was suggested not to post directly to hackers list):
When looking at function BufferSync() in
postgresql/src/backend/storage
Sathish Duraiswamy wrote:
hai
Recently we migrated our database from 8.2.4 to 8.2.12 , went through
manuals and followed the below steps
1.pg_dumpall to take data dump of current database
2.stopped database
3.moved the pgsql to backup folder
4.downloaded 8.2.12 , configured - gmake - gmake i
On Fri, 2009-03-06 at 01:09 +0530, Sathish Duraiswamy wrote:
> Can we automate this process , maintained by postmaster itself
No and that would be a bad idea. There has been discussion in the past
of having an IDLE in TRANSACTION timeout but that is a different thing.
Joshua D. Drake
--
Postgre
Have you tried using "group by"?
> Hello pgsql listers,
>
> I've got a problem that is similar to, but I don't think identical to,
> a cross tab query. My data looks like:
> ID | CAT
> 1 | A
> 1 | B
> 2 | A
> 2 | C
> So for each ID there may be many CAT (categories).
> The cl
Can we automate this process , maintained by postmaster itself
Regards
Sathish
On Thu, Mar 5, 2009 at 10:01 PM, Joshua Tolley wrote:
> On Thu, Mar 05, 2009 at 04:50:09AM -0800, paulo matadr wrote:
> >I need to procedure to kill users in idle,anybody have this made?
> >thanks
>
> See pg_
hai
Recently we migrated our database from 8.2.4 to 8.2.12 , went through
manuals and followed the below steps
1.pg_dumpall to take data dump of current database
2.stopped database
3.moved the pgsql to backup folder
4.downloaded 8.2.12 , configured - gmake - gmake install
5.recreated cluster dir
On Mar 5, 2009, at 11:17 AM, Richard Greenwood wrote:
Hello pgsql listers,
I've got a problem that is similar to, but I don't think identical to,
a cross tab query. My data looks like:
ID | CAT
1 | A
1 | B
2 | A
2 | C
So for each ID there may be many CAT (categories).
The clie
In response to Stefan Kaltenbrunner :
> Tino Wildenhain wrote:
> >Greg Smith wrote:
> >>On Wed, 4 Mar 2009, Artacus wrote:
> >>
> >>>So it looks like at one time we had a cookbook. But the links are
> >>>dead now.
> >>
> >>I'm not sure why Roberto Mello stopped hosting that, but you can see
> >>t
Hello pgsql listers,
I've got a problem that is similar to, but I don't think identical to,
a cross tab query. My data looks like:
ID | CAT
1 | A
1 | B
2 | A
2 | C
So for each ID there may be many CAT (categories).
The client wants it to look like:
ID | CATS
1 | A,B
2
On Thu, 2009-03-05 at 14:08 -0500, Tom Lane wrote:
> Stuart Luppescu writes:
> > phpScheduleIt uses mySQL by default, but they claim is should work with
> > postgres. The setup uses a script that starts like this:
>
> > # phpScheduleIt 1.2.0 #
> > drop database if exists phpScheduleIt;
> > create
Stuart Luppescu writes:
> phpScheduleIt uses mySQL by default, but they claim is should work with
> postgres. The setup uses a script that starts like this:
> # phpScheduleIt 1.2.0 #
> drop database if exists phpScheduleIt;
> create database phpScheduleIt;
> use phpScheduleIt;
Frankly, it looks
On Thursday 05 March 2009 18:39:11 Stuart Luppescu wrote:
> Hello, I'm trying to install phpScheduleIt (an on-line calendaring
> application) on my system that has postgres 8.0.15 running. I have to
> admit upfront that I have very little idea how postgres works; my
> small-business accounting syst
Heine Ferreira wrote:
Hi
When you install a newer version of Postgres how do you upgrade your
database to the new format?
Apparantly you can't just backup the old database and restore it on
the new software.
How do you do this on Windows?
you pg_dump >dumpfile.sql the old one, psql -f dumpf
On Thursday 05 March 2009 00:19:02 Daniel Verite wrote:
> SET DATESTYLE takes predefined keywords such as ISO or US as arguments,
> but I can't find a way to specify a custom format string for
> timestamps.
There is no support for that.
> What I'd like to find is an equivalent to Oracle's
> ALTER
Pat Maddox writes:
> On Thu, Mar 5, 2009 at 10:34 AM, Tom Lane wrote:
>> Odd. Try strace'ing the failing psql session, and send us the last few
>> dozen lines of the output.
> http://pastie.org/private/y7cbpuamemxawmhh8hdna is the strace output
So the relevant info is
sendto(3, "\0\0\0*\0\3\0
On Thu, Mar 5, 2009 at 9:48 AM, Nico Grubert wrote:
> Dear list members
>
> I have upgraded my PostgreSQL 8.2.6 to 8.3.6 and I am having trouble with
> calling "to_timestamp" function.
>
> Here is the query I use:
>
> SELECT a.*
> FROM tblevent a
> WHERE to_timestamp(a.from_datetime,'/MM/DD
Hi
When you install a newer version of Postgres how do you upgrade your
database to the new format?
Apparantly you can't just backup the old database and restore it on the new
software.
How do you do this on Windows?
Thanks
H.F.
On Thu, Mar 5, 2009 at 10:34 AM, Tom Lane wrote:
> Pat Maddox writes:
>> I have an ubuntu intrepid server running postgres 8.3.6. The server
>> is able to accept connections via SSL.
>
>> We have another host that is unable to connect via ssl for some
>> reason. Trying to connect results in
>>
Nico Grubert writes:
>SELECT a.*
>FROM tblevent a
>WHERE to_timestamp(a.from_datetime,'/MM/DD') >= to_timestamp(
> NOW(),'/MM/DD' )
>ORDER BY a.from_datetime
> In PostgreSQL 8.2.6 everything works fine.
> In PostgreSQL 8.3.6 I get the following error:
> --
Pat Maddox writes:
> I have an ubuntu intrepid server running postgres 8.3.6. The server
> is able to accept connections via SSL.
> We have another host that is unable to connect via ssl for some
> reason. Trying to connect results in
> psql:
> and quitting. The server log says
> "could not ac
Hello, I'm trying to install phpScheduleIt (an on-line calendaring
application) on my system that has postgres 8.0.15 running. I have to
admit upfront that I have very little idea how postgres works; my
small-business accounting system uses it, but it's sort of like a black
box to me.
phpScheduleI
Hi there,
I have "PostgreSQL 8.3.5, compiled by Visual C++ build 1400" installed on
Windows XP.
The log files contain the following repeated message:
db=, user= LOG: loaded library "$libdir/plugins/plugin_debugger.dll"
Unfortunately it fills a lot of my log file.
Please tell me how to remove i
Hi. Karsten-san.
Yeah, It was a problem unsolvable by the driver to relay.
although perseverance keeping without giving up!
--
arigatougozaimasu:-)
Regards,
Hiroshi Saito
- Original Message -
From: "Karsten Hilbert"
On Tue, Mar 03, 2009 at 12:35:37AM +0900, Hiroshi Saito wrote:
Tino Wildenhain wrote:
Greg Smith wrote:
On Wed, 4 Mar 2009, Artacus wrote:
So it looks like at one time we had a cookbook. But the links are
dead now.
I'm not sure why Roberto Mello stopped hosting that, but you can see
the last content posted there at
http://web.archive.org/web/200312070
On Thu, Mar 05, 2009 at 04:50:09AM -0800, paulo matadr wrote:
>I need to procedure to kill users in idle,anybody have this made?
>thanks
See pg_cancel_backend.
http://www.postgresql.org/docs/8.3/static/functions-admin.html
- Josh / eggyknap
signature.asc
Description: Digital signature
Dear list members
I have upgraded my PostgreSQL 8.2.6 to 8.3.6 and I am having trouble
with calling "to_timestamp" function.
Here is the query I use:
SELECT a.*
FROM tblevent a
WHERE to_timestamp(a.from_datetime,'/MM/DD') >= to_timestamp(
NOW(),'/MM/DD' )
ORDER BY a.from_dat
I have an ubuntu intrepid server running postgres 8.3.6. The server
is able to accept connections via SSL.
We have another host that is unable to connect via ssl for some
reason. Trying to connect results in
psql:
and quitting. The server log says
"could not accept SSL connection: EOF detected"
On Wednesday 04 March 2009 15:39:36 Mark Styles wrote:
> On Tue, Mar 03, 2009 at 09:38:39PM -0500, Douglas J Hunley wrote:
> > I really wanted to let everyone know that I've created @PGSQL_Announce on
> > Twitter and setup a cron job to parse the feed and post it to Twitter.
> > It's been working f
I need to procedure to kill users in idle,anybody have this made?
thanks
Paulo Moraes
Veja quais são os assuntos do momento no Yahoo! +Buscados
http://br.maisbuscados.yahoo.com
Ashish Karalkar wrote:
Hello list,
I was wondering is there any postgresql template for cacti to monitor
PostgreSQL server.
can anybody plz point me to the same?
Thanks in advance
--Ashish
That worked from google,
sorry for making noise...
http://forums.cacti.net/about23300.html
--A
Hello list,
I was wondering is there any postgresql template for cacti to monitor
PostgreSQL server.
can anybody plz point me to the same?
Thanks in advance
--Ashish
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.pos
Hello,
you can first pipe the output of pg_dump to a compression tool:
pg_dump. | gzip > file.
instead of gzip, I'm using pigz which is faster thanks multithreading.
HTH,
Marc Mamin
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-o
Thanks for the suggestion Marc. It would still be nice to have the custom
format included as an option though with pg_restore supporting it, just for
consistency.
I will, however, follow your recommendation.
Thom
2009/3/5 Marc Mamin
> Hello,
>
> you can first pipe the output of pg_dump to a
Hi,
I noticed that while pg_dump can output a custom format, effectively
compressing the output, pg_dumpall doesn't. Is there a reason for this?
And is there a way to get pg_dumpall to compress it's output?
Thanks
Thom
62 matches
Mail list logo