I have a table, queries, with a column value. There is a trigger on
this table that inserts into query_history for each update to value.
I'm trying to graph the query_history table, so I was using a custom
aggregate to turn it into an array:
CREATE AGGREGATE array_accum (anyelement)
(
sfunc = arr
On 4/11/07, Raymond O'Donnell <[EMAIL PROTECTED]> wrote:
Hi all,
This is probably a very simple one, but I just can't see the answer and
it's driving me nuts. I have a table holding details of academic terms,
and I need an SQL query such that for any given term I want to find the
next term by s
On 4/11/07, Raymond O'Donnell <[EMAIL PROTECTED]> wrote:
Hi all,
This is probably a very simple one, but I just can't see the answer and
it's driving me nuts. I have a table holding details of academic terms,
and I need an SQL query such that for any given term I want to find the
next term by s
Not exactly. SQL Analyzer also includes live monitoring of whatever queries
are coming into the database. You can achieve something similar by enabling
query logging in the settings.
On 1/8/07, Ian Harding <[EMAIL PROTECTED]> wrote:
There is no GUI tool that I know of, but there is EXPLAIN wh
How long has that been available for OS X? Last time I looked at it it
wasn't.
On 1/8/07, Dave Page <[EMAIL PROTECTED]> wrote:
> --- Original Message ---
> From: "Ian Harding" <[EMAIL PROTECTED]>
> To: "Jeffrey Melloy" <[EMAIL PRO
I have not heard of such a thing for PostgreSQL, although I am
sure the basic information you want could be obtained from logging
queries and timing.
- Ian
On 1/8/07, Jeffrey Melloy <[EMAIL PROTECTED]> wrote:
> Not exactly. SQL Analyzer also includes live monitoring of whatever
queries
&
On 1/8/07, Jeffrey Melloy <[EMAIL PROTECTED]> wrote:
Not exactly. SQL Analyzer also includes live monitoring of whatever
queries are coming into the database. You can achieve something similar by
enabling query logging in the settings.
On 1/8/07, Ian Harding <[EMAIL PROTECTE
Oscar Picasso wrote:
HI,
I would like to implement a search by distance to my application.
Something like (pseudo sql):
select * from users
where users.location is less than 15 miles from chicago.
Any documentation on how to implements that?
I guess I also need a database of the cities coor
Patrick TJ McPhee wrote:
In article <[EMAIL PROTECTED]>,
Jim Nasby <[EMAIL PROTECTED]> wrote:
% Not sure if it's still true, but DB2 used to limit varchar to 255. I
% don't think anyone limits it lower than that.
Sybase: 254. Silently truncates.
IIRC, Oracle is 4096.
Jeff
---
Jimbo1 wrote:
Hello there,
I'm a freelance Oracle Developer by trade (can almost hear the boos now
;o)), and am looking into developing my own Snowboarding-related
website over the next few years. Anyway, I'm making some decisions now
about the site architecture, and the database I'm going to n
Andrus Moor wrote:
I have a table containing month column in format mm.
create table months ( tmkuu c(7));
insert into months values ('01.2005');
insert into months values ('02.2005');
How to create select statement which converts this column to date type
containing last day of month like
Mike Rylander wrote:
Mike Rylander wrote:
On 12/6/05, Marcus Engene <[EMAIL PROTECTED]> wrote:
[snip]
A & (B | (New OperatorTheNextWordMustFollow York))
Actually, I love that idea. Oleg, would it be possible to create a
tsquery operator that understands proximity?
codeWarrior wrote:
SELECT trim(trailing ' ' from city_name) AS city_name FROM sys_cities;
You might consider reading the manual as there are a multitude of string
manipulation functions built into postgreSQL
You didn't answer his question. If you're going to rag on someone for
not read
On Oct 13, 2005, at 12:00 PM, Alex Turner wrote:
>
>Instance Manager: Uniquely MySQL. It allows things like starting
and
>stopping the database remotely.
>
>
I cannot think of a reason ever to need this when we have OpenSSH
I'm just curious, but how does this work for a windows bo
Joshua D. Drake wrote:
Bruce Momjian wrote:
Matthew Terenzio wrote:
As much as I respect Marc and Postgresql.org, I can't see Oracle
hiring him away as a "killer" threat to the community. People would
set up camp somewhere else, like Command Prompt. It would hurt
things for a while but t
Neil Conway wrote:
"COUNT(*) very slow": this is a known issue -- see the -hackers archives
for many prior discussions. MVCC makes this hard to solve effectively
(whether applications should actually be using COUNT(*) on large tables
with no WHERE clause is another matter...)
-Neil
And it's
Greg Stark wrote:
Bruce Momjian writes:
Well, I just added to TODO:
* Allow VIEW/RULE recompilation when the underlying tables change
Is dynamic view a industry-standard name? If so, I will add it to the
TODO.
"DYNAMIC" is something I made up.
"ALTER VIEW RECOMPILE" is O
On Jul 30, 2005, at 2:30 PM, Jon Christian Ottersen wrote:We are trying to find a good way to document our database design – what is the rationale behind each table/field, what kind of information is each field supposed to contain, perhaps also something about the linking between the tables etc. Is
I think a better approach is to handle configuration management with a
table in each schema. Update the schema, update the table. This works
well with automating database upgrades as well, where upgrades are written
as scripts, and applied in a given order to upgrade a database from release
A
D A GERM wrote:
I have been trying to write an sql statement that returns the same
hours in a time stamp no matter what the date.
I can to pull same hours on the the same days but have not been able
to figure out how to pull all the same hours no matter what the date.
Here is the one sql stat
Or
select date_part('day', date_trunc('month', '01/10/04') + '1
month'::interval - '1 day'::interval) as days;
or
select date_part('day', to_date('mon', 'Jan') + '1 month'::interval - '1
day'::interval) as days;
Arthur Hoogervorst wrote:
Hi,
Something like this?
SELECT date_part('day',
Chris wrote:
I know this isn't entirely postgresql specific, but it wouldn't be on
another list either so here goes...
I am writing an open source application where I would like to support
at least oracle, and possibly firebird or DB2, in addition to
postgresql which will be the default. I'm not g
Ragnar Hafstað wrote:
On Wed, 2005-01-05 at 13:03 -0800, Jeff Davis wrote:
On Wed, 2005-01-05 at 13:14 -0700, Michael Fuhr wrote:
On Wed, Jan 05, 2005 at 08:15:28PM +0100, Joost Kraaijeveld wrote:
[snip]
PostgreSQL
doesn't have materialized views per se but it does have function
Tom Lane wrote:
Jeffrey Melloy <[EMAIL PROTECTED]> writes:
I attempted to install 8.0 RC 2 alongside 7.4.5 on my OS X box, but
initdb failed with an error about not enough shared memory.
Don't forget that both shmmax and shmall may need attention ... and,
just to confuse matter
it:
http://www.visualdistortion.org/misc/dont_do_this.png)
Jeffrey Melloy
[EMAIL PROTECTED]
---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
messa
If you want to return rows with zeros, you may need to do something like
this:
select b.name as viewer, count(viewerid)
from xenons b left join viewer_movies a on (b.id = a.viewerid)
group by b.name
Eddy Macnaghten wrote:
select b.name as viewer, count(*)
from viewer_movies a, xenons b
where b.id
Tom Lane wrote:
Jeffrey Melloy <[EMAIL PROTECTED]> writes:
I have a couple users trying to install Postgres on OS X. To the best
of my knowledge, both of them are using 7.4.5/10.3.5, and got identical
errors while trying to init the database:
They need to increase the system
I have a couple users trying to install Postgres on OS X. To the best
of my knowledge, both of them are using 7.4.5/10.3.5, and got identical
errors while trying to init the database:
Reducing the shared buffers didn't help.
Any thoughts would be appreciated.
Jeffrey Melloy
[EMAIL PROT
Oleg Bartunov wrote:
Marcel,
it's very difficult from you message where do you lost.
pgsql version, OS version, cut'n paste of commands you run and
output would be fine.
To install tsearch2 most people need (as postgresql superuser):
1. install postgresql and headers
2. cd contrib/tsearch2
3. make;
Recently, I decided to rename one of my schemas from "adium" to "im".
Then, all inserts started failing.
I recreated a couple functions, changed the search path, and all inserts
are still failing due to referential integrity checks going against
"adium" still. Is there any way I can fix this, sh
On Thursday, October 9, 2003, at 01:42 AM, Shridhar Daithankar wrote:
[EMAIL PROTECTED] wrote:
One of my friend lost data with mysql yesterday.. The machine was
taken down for disk upgrade and mysql apperantly did not commit the
last insert.. OK he was using myisam but still..:-)
It sounds lik
If I'm understanding you correctly, you can do something like:
select cola,
colb,
exists
(select 'x'
from tableb
where colc = colb)
from tablea
Since that has a subselect, you may get better performance with
something li
On Thursday, August 28, 2003, at 09:03 PM, Williams, Travis L, NEO
wrote:
I have a table1 with 2 col (a & b) where b can sometimes be null. I
need a query that if B is null I get back the contents of A.. but if B
is not null I do a "select d from table2 where d like '%b%'" There is
nothing to jo
On Thursday, August 28, 2003, at 08:58 AM, Dennis Gearon wrote:
Heath Tanner wrote:
Not to take anything away from the books on the topic, but my
favorite source is the docs that got installed with postgres
(/usr/local/pgsql/doc/html).
The index isn't great, but easily overcome:
grep -i "sear
Hi,
I'll try to switch from Oracle to postgres for some small applications.
Is it possible to build functions like Oracle's nvl or decode with
pgplsql?
How can I make a function like nvl that works for every datatype?
Best regards,
Christian
Try coalesce. The syntax is the same as nvl.
Jeff
-
I was recently running into performance problems with a query
containing now()::date or CURRENT_DATE. When I went to debug,
'now'::date made efficient use of the index (on a timestamp field).
The docs say that 'now' is turned into a constant right away. Is this
overhead/poor planning simpl
If you don't mind spending a little money and are on Windows, you can
use Microsoft Visio Professional.
On Saturday, August 16, 2003, at 01:38 AM, Ron Johnson wrote:
On Thu, 2003-08-14 at 23:17, David Fetter wrote:
"Tim Edwards" <[EMAIL PROTECTED]> wrote:
I have been request to create a relati
It does if you look at the original email. Maksim must've just
transposed a couple letters when he was writing his demo.
Jeff
Kathy zhu wrote:
If it skips "-", then RMT-* should come before RM-V*, but they don't,
why ??
Maksim Likharev wrote:
en_US locale skips? punctuation from sorting in
If you use a serial datatype, it simply says "the *default* behavior is
to use the next value of sequence a". So you can insert 1, 2,
10,204,492 into the column just fine. However, by inserting data into
something you want to auto-increment, you can run into non-uniqueness.
(Like you were).
drop table A;
create table A (
id SERIAL PRIMARY KEY,
foo int default 5,
bar int default 10
);
insert into A (id, foo, bar) values (1, 1, 1);
insert into A (id, foo, bar) values (2, 2, 2);
insert into A (id, foo, bar) values (3, 3, 3);
insert into A (id, foo, bar) v
40 matches
Mail list logo