Hi All,
Currently in one of the projects we want to restrict the unauthorized users to
the Postgres DB. Here we are using Postgres version 8.2.0
Can anybody tell me how can I provide the user based previleges to the Postgres
DB so that, we can restrict the unauthorized users as well as porivde
Hello,
I'm attempting to convert a big table into smaller tables; I currently
do a lot of INSERT .. RETURNING calls on the big table, which works
perfectly.
To convert the table into smaller tables, I have set up a test case of
3 tables, based on a 'CHECK ( hashtext(field) % 2 ) = -1' (or 0 or 1
On Wednesday 11 April 2007 Marc's cat, walking on the keyboard, wrote:
> The bottom line question is can an applet served to a client machine other
> than the one the postrgres db resides on read that db?
>
> An applet I've written and tested on the same box as my database runs fine.
Marc's, due t
Hello,
I'm attempting to convert a big table into smaller tables; I currently
do a lot of INSERT .. RETURNING calls on the big table, which works
perfectly.
To convert the table into smaller tables, I have set up a test case of
3 tables, based on a 'CHECK ( hashtext(field) % 2 ) = -1' (or 0 or 1
Hello Poul,
I can't advise specifically regarding your problem (I'm sure some one
will chime in soon). I will offer some general advice regarding java
and jdbc connections. You are probably already aware of this
Typically connections between java and database take a relatively long
time to e
I've drastically altered a few tables in a major schema change.
because of this, some columns that i'd really like to be 'leftmost'
are rightmost.
can anyone suggest a good way to reorder the table ? everything that
i can think of involves creating a new table which means I'd have to
red
Does anyone have postgresql types for message digests, especially md5
and sha1?
Obviously I could store these as text (as I currently do), but I'm
particularly interested in custom types that store digests as binary
blobs and provide conversion to/from text.
Am I correct in assuming that the spac
Here's a PL/pgsql implementation I wrote.I'm sure critics will be
able to improve upon it:
CREATE or REPLACE FUNCTION "common"."newid"()
RETURNS "pg_catalog"."varchar" AS
$BODY$
DECLARE
v_seed_value varchar(32);
BEGIN
select
md5(
inet_client_addr()::varchar ||
timeofday() ||
inet_server_ad
Hello,
Okay, I have some troubles trying to determine how to most efficiently
store a database which will contain a couple of huge tables (think
5bil+ rows). These tables each have a bigint id and a character
varying value. Now, I'm currently partitioning these tables based on
the hashtext (value
java.sql.SQLException: ERROR: XLogFlush: request
0/240169BC is not satisfied --- flushed only to 0/23FFC01C
This error I was in the logs of a java process that was failing to get some
data. But using psql I was able to connect and query all the data. Thus this
may indicate some connection / state
I have a java application receiving data from a thousand devices on
periodic basis.
When receiving data the application gets a database connection, inserts
a row and closes the connection again.
If this process takes more than 15 seconds, the device assumes the
connection dead and makes a new on
Marc wrote:
what version of PostgreSQL?
what version of the jdbc driver?
The bottom line question is can an applet served to a client machine
other than the one the postrgres db resides on read that db?
I can't see why not.
An applet I’ve written and tested on the same box as my database
Raymond O'Donnell wrote:
> 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 starting date (or just NULL if there
On Wednesday 11 April 2007 14:01:55 Alberto Molteni wrote:
> >You should use
> >
> > conn.setAutoCommit(false);
> > conn.execute(...)
> > conn.execute(...)
> > conn.execute(...)
> > conn.commit();
> >
> >
> > Thanks!
>
> jan
>
> Then, conn.setAutoCommit(false); has to be regarded as a begin s
You can use kill PID
- Original Message -
From: Ashish Karalkar
To: pggeneral
Sent: Tuesday, April 10, 2007 8:01 AM
Subject: [GENERAL] Kill session in PostgreSQL
Hello all,
is there any command just like ORACLE Uses kill session to kill a particular
session .
tried wit
On Wednesday 11. April 2007 19:50, Andrew Edson wrote:
>I'm needing to do a partial dump on a database. All of the entries in
> the db can be marked as one of two groups, and I've been asked to
> create a dump of just the second group. It is possible to do a
> select statement based dump and just
Overview:
plpgsql functions seem to ignore partitioning, even with
constraint_exclusion on.
Description:
Version is 8.2.3 on RHEL 4, constraint_exlusion is on. I have an
events table (fw_events) partitioned by an int and a date (fw_id,
fw_date for discussion) following the recommendations ou
On Wednesday 11 April 2007 12:49:49 Albert wrote:
> Hi all!
>
> Actually I have a client-server application with one server and many
> clients each one of which opens a different connection to the postgres
> database. In order to avoid those known problems with the execution of
> the different clie
You'll need to do something like this, called a correlated subquery:
Select t1.term_id, t1.term_name, t1.term_starts, t2.term_id as
next_term
From term t1, term t2
where t2.term_starts = (select min(t3.term_starts) from term t3 where
t3.term_starts > t1.term_starts)
-Original Message-
F
Hello,
Okay, I have some troubles trying to determine how to most efficiently
store a database which will contain a couple of huge tables (think
5bil+ rows). These tables each have a bigint id and a character
varying value. Now, I'm currently partitioning these tables based on
the hashtext (value
On 2007-04-11, "Leon Mergen" <[EMAIL PROTECTED]> wrote:
> Now, my question is: how big is the chance that a collision happens
> between hashes ? I noticed that the function only returns a 32 bit
> number, so I figure it must be at least once in the 4 billion values.
Assuming it's a uniform random
Hello,
Okay, I have some troubles trying to determine how to most efficiently
store a database which will contain a couple of huge tables (think
5bil+ rows). These tables each have a bigint id and a character
varying value. Now, I'm currently partitioning these tables based on
the hashtext (value
dcrespo wrote:
Hi everybody,
I'm implementing something like this:
SELECT
CASE WHEN add_numbers(t1.main_number,t2.main_number)>100
THEN t1.description1
ELSE t2.description1
END AS number_description1,
CASE WHEN add_numbers(t1.main_number,t2.main_number)>100
T
Hi folks
I Agree with Stephen ,before update to 8.2.3 version
i can see "vacuum database xx "
tailing the file log, off course log statements i'ts
in 'all' .
After update don't see anymore, plus pgAdmin reclaim
to me for vacuum databases.
best regards
MDC
--- "Schwenker, Stephen" <[EMAIL
Hello,
Okay, I have some troubles trying to determine how to most efficiently
store a database which will contain a couple of huge tables (think
5bil+ rows). These tables each have a bigint id and a character
varying value. Now, I'm currently partitioning these tables based on
the hashtext (value
Hello,
I'm attempting to convert a big table into smaller tables; I currently
do a lot of INSERT .. RETURNING calls on the big table, which works
perfectly.
To convert the table into smaller tables, I have set up a test case of
3 tables, based on a 'CHECK ( hashtext(field) % 2 ) = -1' (or 0 or 1
Is something like this too simple?
select term_id from terms where term_id > 2 order by term_starts limit 1;
or
select term_id from terms where term_starts > '2007-09-01' order by
term_starts limit 1;
depending on whether you have the term_id or the term_starts date.
Susan Cassidy
Raymond O
I have written a simple procedure that accepts anyarray, and concatinates the
elements separated by a space and returns the result to anyelement.
I know when I call this function I will always be passing varchars. If the
length of the resultant concatination
is longer than the maximum length of
On Wednesday 11 April 2007 12:08, Dmitry Koterov wrote:
> Hello.
>
> Have anybody used SkyTools in production environment?
> What's the impression? In practice - is it now more preferrable than Slony
> or not yet?
Well, skype using them in production... I think the general consensus of the
post
I've been testing pg_standby as a helper application for a warm
standby setup. So far, so good. When the environment is controlled
and everything happens as expected, I'm able to operate a basic
primary/standby setup. (This is all using 8.2.3 on Solaris x86, btw.)
One thing I noticed in ear
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
Check the URLs below. It might be what you are looking for:
http://www.postgresql.org/communityfiles/27.pdf
http://tomcat.apache.org/tomcat-5.5-doc/printer/jndi-datasource-examples-howto.html
Dhaval
On 4/9/07, Marc <[EMAIL PROTECTED]> wrote:
Hi there.
I've written an applet that connect
Andrew Edson <[EMAIL PROTECTED]> writes:
> A copy of the statement and explain results on it appear below. Would
> someone please assist me in figuring out how to more appropriately streamline
> this statement?
The lack of any applicable index on ttrans seems to be the biggest
problem.
Andrew Edson <[EMAIL PROTECTED]> writes:
> I am aware of this, yes, but the data in question is all (both sets)
> contained on a single table. That's why I was looking for a way to do a
> 'dump where (select foo where bar = 'criteria')' structure.
pg_dump is not in the business of editorializin
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 starting date (or just NULL if there isn't one).
Here's
Andrew Edson wrote:
I am aware of this, yes, but the data in question is all (both
sets) contained on a single table. That's why I was looking for a
way to do a 'dump where (select foo where bar = 'criteria')'
structure.
What if you do that select into a new table, then pg_dump just that
I am aware of this, yes, but the data in question is all (both sets) contained
on a single table. That's why I was looking for a way to do a 'dump where
(select foo where bar = 'criteria')' structure.
Merlin Moncure <[EMAIL PROTECTED]> wrote: On 4/11/07, Andrew Edson wrote:
> I'm needing to d
On Apr 11, 3:45 pm, [EMAIL PROTECTED] ("Marc") wrote:
..
> The applet has been self signed. ..
I did miss that bit on my initial reading,
but like I said earlier - best to continue
it in a discussion on a Java group.
Andrew T.
---(end of broadcast)---
Hi everybody,
I'm implementing something like this:
SELECT
CASE WHEN add_numbers(t1.main_number,t2.main_number)>100
THEN t1.description1
ELSE t2.description1
END AS number_description1,
CASE WHEN add_numbers(t1.main_number,t2.main_number)>100
THEN t1.descriptio
On Apr 11, 3:45 pm, [EMAIL PROTECTED] ("Marc") wrote:
> The bottom line question is can an applet served to a client machine other
> than the one the postrgres db resides on read that db?
Certainly. But the applet needs to be signed
by the distributor, and trusted by the end-user.
> Why does an
It says it's on and I have also turned on all stats collecting.
-Original Message-
From: Alvaro Herrera [mailto:[EMAIL PROTECTED]
Sent: Monday, April 09, 2007 3:06 PM
To: Schwenker, Stephen
Cc: Tom Lane; pgsql-general@postgresql.org
Subject: Re: [GENERAL] 8.2.3 AutoVacuum not running
S
On 4/11/07, Andrew Edson <[EMAIL PROTECTED]> wrote:
I'm needing to do a partial dump on a database. All of the entries in the
db can be marked as one of two groups, and I've been asked to create a dump
of just the second group. It is possible to do a select statement based
dump and just grab th
On Wed, Apr 11, 2007 at 06:49:18PM +0200, Listmail wrote:
>
>
> >If someone wants the schema change, react *now*. Later on we can only
> >append to it, and not change it :)
>
> Since I like to complain...
>
>
>
> Suppose you someday add another dot, or a "b" for beta, wouldn't it
You should use
conn.setAutoCommit(false);
conn.execute(...)
conn.execute(...)
conn.execute(...)
conn.commit();
Thanks!
jan
Then, conn.setAutoCommit(false); has to be regarded as a begin statement?
I had already put the autocommit flag to false soon after the creation of
the connec
I'm needing to do a partial dump on a database. All of the entries in the db
can be marked as one of two groups, and I've been asked to create a dump of
just the second group. It is possible to do a select statement based dump and
just grab the one set of records in the output?
---
On Wed, Apr 11, 2007 at 09:21:46AM -0700, Chris Travers wrote:
> DO ALSO rules involving NEW are fundamentally dangerous to the integrity
> of data because NEW is not guaranteed to be internally consistent. DO
> INSTEAD rules are fine (there is only one NEW), as are any DO ALSO rules
> involvin
I was reading an interview with Chris Date the other day, which got me
thinking about a problem I'm currently having:
I have an application that keeps information in 6 denormalized tables,
D1 through D6. To tie things together, all these tables have a common
column, let's call it obj_id.
There
Hi all!
Actually I have a client-server application with one server and many
clients each one of which opens a different connection to the postgres
database. In order to avoid those known problems with the execution of
the different clients' operations at database, I implemented
everything in this
If someone wants the schema change, react *now*. Later on we can only
append to it, and not change it :)
Since I like to complain...
Suppose you someday add another dot, or a "b" for beta, wouldn't it be
better to have
823
... or
---(end of b
On Tue, Apr 10, 2007 at 12:18:52PM +0200, Magnus Hagander wrote:
> On Tue, Apr 10, 2007 at 09:52:52AM +0100, Dave Page wrote:
> > Magnus Hagander wrote:
> > > 2) Create a new file with a specific schema. Something like:
> > >
> > >
> > >
> > >
> > > This is the most lightweight solution.
> >
Listmail wrote:
Since we now have UPDATE/INSERT/DELETE RETURNING, one could
imagine the rules using these to access the actual rows and not the
expressions...
But there is a perfectly valid argument against that :
- There already is a mechanism designed specifically for this
If this message has already appeared on the list, I apologize. My system tried
to temporarily freeze up when I attempted to send this message a few minutes
ago, and I do not know if I hit send before it halted or not.
I am working with a php program that is designed to enter the database,
Hello.
Have anybody used SkyTools in production environment?
What's the impression? In practice - is it now more preferrable than Slony
or not yet?
On 11 Apr 2007 00:25:50 -0700, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
Hi all,
I wonder if there's a way to use COPY FROM command when dealing with a
data file containing records whose fields are delimited with zero-
byte? Or I'd better change the delimiter? :)
you can always run it throug
"Schwenker, Stephen" <[EMAIL PROTECTED]> writes:
> It says it's on and I have also turned on all stats collecting.
My guess is that it's actually running but is not choosing to do any
vacuums for some reason. Try setting log_min_messages to DEBUG5 for
awhile and trawling the postmaster log for ev
Should I just use a trigger to update these totals? That way concurrent
deletes/updates would be guaranteed to update the totals. The only down
side is that deleting 10 records would result in 10 updates to the
totals. But deleting is rare enough that it probably isn't a problem.
William Ga
This is part 2 of my "serializable" question from earlier. Thanks to
everyone who answered the first part. (Hopefully there will be no part 3)
When a user adds a record, I update a table with totals. But when a
user deletes data, I subtract the totals. That presents a more
interesting situ
Using Postgresql 8.2.3
The following query functions correctly:
select lastname as name from person where lastname ='Smith'
union
select firstname as name from person where firstname = 'John'
order by name;
---
The followi
Hi all,
I wonder if there's a way to use COPY FROM command when dealing with a
data file containing records whose fields are delimited with zero-
byte? Or I'd better change the delimiter? :)
---(end of broadcast)---
TIP 4: Have you searched our list
The bottom line question is can an applet served to a client machine other
than the one the postrgres db resides on read that db?
An applet I've written and tested on the same box as my database runs fine.
When I try running the applet from another computer on the network I get an
error trying to
Rules mess with queries. For data copying/archiving kinds of tasks,
triggers are a better bet, like you suggested in your original post.
Let me put that a different way: rules can *only* be used where data
integrity is not at stake. My own thinking is that it might be time to
make an officia
On Tue, Apr 10, 2007 at 10:52:11PM +0200, Peter Eisentraut wrote:
> William Garrison wrote:
> > I have a table that keeps running totals. It is possible that this
> > would get called twice simultaneously for the same UserID. Do I need
> > to put this in a serializable transaction?
>
> Transacti
I just came up with a far more problematic case too and wonder if
documentation is enough. Maybe we should warn about potential problems
more loudly.
Imagine the following case: insert into test_table (test) values
(random()) where an insert rule propagates the changes faithfully to the
next
Hmm.
I just came up with a far more problematic case too and wonder if
documentation is enough. Maybe we should warn about potential problems
more loudly.
Imagine the following case: insert into test_table (test) values
(random()) where an insert rule propagates the changes faithfully
64 matches
Mail list logo