I have a table, "connection_events", partitioned via inheritance on a
column "logtime." I'm running 8.2. Mostly the partitioning works
pretty well. I have noticed though that the query
select max(logtime) from connection_events
always uses seq_scan across all partitions, which is painful.
(Re
gives about 50% savings), but is there a way to force
pg's own compression before I resort to this?
--
Jonathan Ellis
http://spyced.blogspot.com
---(end of broadcast)---
TIP 6: explain analyze is your friend
Better yet, define a trigger so you and/or other programmers don't have
to worry about including that field in every update.
-Jonathan
- Original Message -
From: Anand Raman <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 8:28 PM
Subject: Re: Find out when a
> I putting together a small (10 tables) postgresgl database for a
non-profit
> organization, and would like to use an entity relationship diagram
> tool. They would like to be maintain it in the future, using a tool that
> preferably runs on a Windows client. Are there any decent tools availabl
> Returns not empty string but NULL:
The two are equivalent in Oracle. Try select 'a' || null || 'b' from dual
and compare it to postgres.
-Jonathan
> > Part of this document will be on how to port Oracle PL/SQL to
> > Postgres' PL/SQL and PL/Tcl.
>
> Excellent. Now we need someone to do the MySQL version...
? MySQL doesn't have stored procedures AFAIK.
-Jonathan
> Adding a WHERE clause to the query doesn't work for example:
>
> SELECT outcome,count(outcome) from safety
> GROUP BY outcome
> WHERE InjDate='2000-11'14';
A WHERE clause must come before a GROUP BY clause.
Also note that if you are using a table with the row defined as datetime
instead of dat
I defined a procedure
CREATE FUNCTION meta_class (varchar) RETURNS varchar AS '
...
' LANGUAGE 'pltcl';
This works fine. But when I want to call it from another tcl procedure I
get errors:
bf2=# CREATE FUNCTION foo (varchar) RETURNS varchar AS '
return [meta_class $1]
' LANGUAGE 'pltcl';
b
I tried mailing this last week, but I think it didn't get sent:
I defined a procedure
CREATE FUNCTION meta_class (varchar) RETURNS varchar AS '
...
' LANGUAGE 'pltcl';
This works fine. But when I want to call it from another tcl procedure I
get errors:
bf2=# CREATE FUNCTION foo (varchar) RETUR
bf2=# create function foo (varchar, varchar) returns varchar as '
begin
return $1;
end;
' language 'plpgsql';
bf2'# bf2'# bf2'# bf2'# CREATE
bf2=# bf2=# select foo('asdf', null) from dual;
foo
-
(1 row)
Even though the function foo never references the null, apparently postgres
thinks,
I couldn't find anything in the man page about this -- does psql check for
~/.psql or anything so I don't have to manually --pset pager=off every time
I run it? If there is such a file, what is the format for specifying
options?
-Jonathan
11 matches
Mail list logo