Hi,
I've implemented an aggregation function to compute quartiles in C
borrowing liberally from orafce code. I uses this code in a windowing
context and it worked fine until today - and I'm not sure what
changed. This is on 9.1.2 and I have also tried it on 9.1.4.
What I have determined so far (b
- without orafce to guide me I
would have had a hard time figuring any of this out from the docs. I'd
gladly make the quartile implementation available for this purpose if
there is interest.
Adriaan
On 7 August 2012 15:04, Adriaan Joubert wrote:
> Hi,
>
> I've implemented an aggr
Fuad Abdallah wrote:
I have just compiles postgres-6.4 under irix 6.5.1 with the SGI cc
v7.2.1
> and everything seems to work fine - the regression test works with some
> minor deviations - but i can not delete a database.
> destroydb fails with the following error:
>
> ERROR: typeidTypeRelid:
Has anybody managed to get any of the postgres 6.4 versions to run
correctly on Alpha? I have tried 6.4 through 6.4.2 and cannot get any of
them to compile/run (I managed to get some versions to compile after
some minor modifications, but then they did not run without crashing).
I've tried both th
Hi
I don't know whether this has been fixed in 6.4 -- I still cannot get
6.4 to compile and run on Alpha -- but I have the following error when
querying a view in 6.3.2:
I have a table with jobs/tasks (one job can consist of several tasks)
that need to be executed, and have created a rel
As I cannot return a complete row of a record from a function (written
in PL), I return an oid. So the function looks like this
CREATE FUNCTION task_next (int4) RETURNS oid AS
'
DECLARE
...
END;
' LANGUAGE 'plpgsql';
This function can return null. I then select the next row with
tt> select * fr
The Hermit Hacker wrote:
> >
> > I don't want to create a polemic, but is it possible to make a
> > recovery of the previous WWW interfaces of the postgreSQL.org site?
> > What does an elephant do on the home page? Probably you have been
> > hacked :-)
>
> The elephant surrounded by the diamond h
Andy Lewis wrote:
>
> I have a table that among other things has a name, address, city, state
> fields. When I insert into, I want to be able to make sure that there is
> no duplicate records or that a row is inserted that is already in the DB.
>
> Question number one is: Should I use a trigger
>
> select count(*) into cnt from where new. = key;
> if (cnt>0) then
> delete from where key = new.
> end if
>
Just looked at this, and this is not actually what you wanted. If you do
not want to replace the old row, do something along the lines
RAISE EXCEPTION ''Duplicate entry''
Jim Jennis wrote:
> A DEC (sorry Compaq) Alpha running Linux is a mean combination. Used
> Alpha's can be had fairly cheap and they really scream. If cost is an
> issue, I would look for an older one used e.g. a
>
> DEC 2100/A500MP (was marketed as a "Sable")
>
> Put Linux on the beast and watch
I solved something like this recently in perl. It's not terribly
efficient, but it is simple. I'm doing this from memory, so it may need
some debugging. Use something along the lines of
#!/usr/local/bin/perl
while (<>) {
@a = split /(\")/;
# This gives you a list with some of the items being
Hi,
I've got a large application with hundreds of different queries. I
thought I had them all sorted out (i.e. determined the correct indices
to make them quick), but now I see that, with 5 copies of the
application running, I'm getting some serious contention on the
database. Is there so
I'm seeing this in psql.
I think this is bad. What could cause this? It is a join between three
largish tables. I get loads of these.
Backend sent B message without prior T
Backend sent B message without prior T
Backend sent D message without prior T
Backend sent B message without prior T
Backe
Hi,
I'm trying to define a new bit type with a length of two bytes, and to
define a set of operators on this type. I've hit the following problem:
I cannot define a | operator, as the parser doesn't like it.
tt=> drop operator | (Bit2,Bit2);
ERROR: parser: parse error at or near "|"
tt=
I have my marvelous bit type working now, and now I find out I cannot
use it in PL scripts.
tt=> create table test (a int4, b bit2);
CREATE
tt=> CREATE FUNCTION mytrig () RETURNS opaque AS
'
tt-> '
tt'> DECLARE
tt'> def_state CONSTANT BIT2 := 'b0001'::BIT2;
tt'> BEGIN
tt'> new.b = def_state;
> tt=> create table test (a int4, b bit2);
> CREATE
> tt=> CREATE FUNCTION mytrig () RETURNS opaque AS
> '
> tt-> '
> tt'> DECLARE
> tt'> def_state CONSTANT BIT2 := 'b0001'::BIT2;
> tt'> BEGIN
> tt'> new.b = def_state;
> tt'> RETURN new;
> tt'> END;
> tt'> ' LANGUAGE 'plpgsql';
> ERROR: pa
Hi,
I defined a new type, and it is essential that I am able to use it in
an index. This seems to require a bit more than just having the
comparison operators. On the create index page it seems that it is
necessary to define an *_ops class for the new type, but I have no idea
how I go abo
>
> I defined a new type, and it is essential that I am able to use it in
> an index. This seems to require a bit more than just having the
> comparison operators. On the create index page it seems that it is
> necessary to define an *_ops class for the new type, but I have no idea
> how
Hi,
I finally finished my 1-byte bitmask type. You can even use it in btree
indexes now. It provides all the standard bit operations (& | ^ ~ << >>)
and I hope someone will find it useful. If anybody has any suggestions
for improvements or questions, please let me know. If it passes muste
> Erik Colson wrote:
>
> I'm using Apache with mod_perl to access a PostgresSQL database (6.5)
> .
>
> The script starts with connecting to the database... this means that
> the server is actually reconnecting everytime the script starts and
> disconnect when the HTML page is generated.
>
> I'v
Bruce Momjian wrote:
> > hi, this is kind of emergent!
> >
> > we are in the process of decision making. Is there an true64 on
> > alpha port?
> >
> > thanks in advance!!
>
> We have alpha/osf, but no tru64 that I know of.
Tru64 is just a renaming of Digital Unix / OSF/1(Those Compaq people
Satyajeet Seth wrote:
>
> Hi
> The query:
> select * from webdata except select * from webdata1;
> takes abysmally long .How can I optimise it?
> The particulars are:
You could try
select * from webdata w
where not exists
(select * from webdata1 w1
where w1.tid=w.tid
Just drop the function, drop all triggers that use the function,
re-create the function and recreate all triggers. If the function is
called by other PL functions, you need to drop and re-install those as
well. If you keep them all in a big file, every one preceded by drop,
you can just reload th
> > With this second method, you'd probably need to beware race conditions. If
> > another process inserts a record into mytable after you do but before you
> > call currval(), then you'll get the wrong value.
> >
> > Not an issue if you've only got one process accessing the table - probably
> > i
john huttley wrote:
> > I believe we are adding Oracle compatibility as possible. We are
> > working on write-ahead log, long tuples, foreign keys, and outer joins.
> > Anything else?
>
> Yes, earlier in the year I was trying to migrate from Pervasive SQL to
> posgtres and
> came to a screaming
Hi,
Yes, I think reliability needs more work. I've had quite a few problems with
system indexes getting corrupted (number of tuples incorrect and some other
bizarre problems). Very hard to pin down as I haven't been able to reproduce any
of these cases. I've got the feeling that there may be
> > Please help me recover our database from what I think
> > is a duplicate key in unique index problem.
>
> This may not help, and forgive my asking the obvious, but have
> you done a SELECT on the table and actually *seen* duplicate 'id'
> values in the SERIAL column? That would surprise me be
surfer girl wrote:
> I checked the manual on this but couldn't find a clear answer:
>
> I've got two dates in a database, a start date and and end date, which are type
>"date." I want to compare these dates to today's date in the SQL statement, something
>along the lines of "startdate < date <
Steve Wolfe wrote:
> /var/lib/pgsql reports that we're running 6.3 - which I don't find on the
> FTP site. Is that not a valid distribution number, or is the source not
> available?
Oh, I remember running 6.3. That was a looong time ago. Current version is
6.5.3 and 7.0 is about to be release
od and improving all the time. Show me another system where you can either
fix bugs yourself or get a fix off the mailing list in a few hours!
Adriaan
--
--+-------
Dr Adriaan Joubert | Phone: +357-2-750 652
APL Fi
30 matches
Mail list logo