On 17 Nov 2011, at 7:10, Siva Palanisamy wrote:
> If there is a better solution, kindly let me know.
>
> CREATE OR REPLACE FUNCTION Fun()
> RETURNS VOID AS '
> DECLARE
> Id INTEGER;
> BEGIN
> INSERT INTO table1 VALUES (DEFAULT, ''Sample'', DEFAULT);
> SELECT MAX(id) I
On 11/16/11 11:16 PM, Siva Palanisamy wrote:
Thanks for the solution. If I use currval('sqlname') in a loop of 7
records, what will happen if a record is inserted manually? I guess it will
alter the sequences, and wrong values/chain might be introduced in foreign
tables in the below functi
Hi John,
Thanks for the solution. If I use currval('sqlname') in a loop of 7
records, what will happen if a record is inserted manually? I guess it will
alter the sequences, and wrong values/chain might be introduced in foreign
tables in the below function. Could you please clarify me on th
On 11/16/11 10:23 PM, John R Pierce wrote:
use nextval('seqname')
sorry, I meant, currval('seqname') ps.
--
john r pierceN 37, W 122
santa cruz ca mid-left coast
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
On 11/16/11 10:10 PM, Siva Palanisamy wrote:
If there is a better solution, kindly let me know.
use nextval('seqname') ... full transactional integrity without any
blocking or locking.
--
john r pierceN 37, W 122
santa cruz ca mid-left
Hi ya,
I've 2 tables: One being the master (table1) and another being the slave
(table2). I want to lock table1 until the below function completes, and it
should unlock the same at last.
Below is my function. Pls guide me on how to apply locking table1 and unlocking
the same finally. The scenar
John R Pierce writes:
> On 11/16/11 4:24 PM, Jason Buberel wrote:
>> Just wondering if there is ever a reason to vacuum a very large table
>> (> 1B rows) containing rows that never has rows deleted.
> no updates either?
To clarify: in Postgres, an "update" means an insert and a delete.
So unles
recently I have found several tables has exactly the same pkey, here is
the definition:
"diggcontent_data_account_pkey" PRIMARY KEY, btree (thing_id, key)
the data is like this:
159292 | funnypics_link_point | 41
| num
159292 | funnypics_link_point | 40
| num
On 11/16/11 4:24 PM, Jason Buberel wrote:
Just wondering if there is ever a reason to vacuum a very large table
(> 1B rows) containing rows that never has rows deleted.
Under what circumstance would the table benefit from a vacuum?
no updates either?
you still want to do a vacuum analyze eve
Just wondering if there is ever a reason to vacuum a very large table (> 1B
rows) containing rows that never has rows deleted.
Under what circumstance would the table benefit from a vacuum?
-jason
--
Jason L. Buberel
CTO, Altos Research
http://www.altosresearch.com/
650.603.0907
hi, firends,
I have a 64bit 128GB machine, I have two choices:
1. I could set PostgreSQL share_buffer to a large value, such
as 100GB, let os uses the remaining 28G memory for file system buffer
2. I also could set PostgreSQL share_buffer to a small value,
such as 10GB, l
Hi Eliot,
2011/11/17 Eliot Gable :
> 1a) Can the foreign tables be written to? For example, I have server1 with
> table foo and server2 which does 'create foreign table bar' where bar
> references server1.foo. Can server2 write to bar and have it show in
> server1.foo?
Foreign tables in 9.1 are
Thank you all,
I did look at the log , I enabled pg_stat_statements , however it showed
the buffers, scans and other info about the query execution - not the
records number, any idea how can I get it?
I agree that the problem is in qty of the queries,
will investigate the client.
thank yo
On 17 Listopad 2011, 2:07, hyelluas wrote:
> Hello,
>
> I'm trying to capture amount of data moving from client app to the server
> &
> back.
> The client is executable (c#) gue on windows, server is lunix centOS,
> PostgreSQL 8.4.
> We see serious performance difference between execution via LAN
On November 16, 2011 05:07:05 PM hyelluas wrote:
> I see 900 queries sent by 1 client in 7 min with 1 click on the screen -
> does the log show the real thing?
The logs show the real thing. Gotta love ORMs.
>
>
> Is it possible to log the number of records returned by that query?
I doubt the
Hello,
I'm trying to capture amount of data moving from client app to the server &
back.
The client is executable (c#) gue on windows, server is lunix centOS,
PostgreSQL 8.4.
We see serious performance difference between execution via LAN & VPN.
I enabled the logging and used pgFouine to anal
Andreas Kretschmer writes:
> Dhimant Patel wrote:
>> I also created several procedures/functions and now I don't remember the last
>> procedure I worked on! - I thought I could always get this from metadata.
>> Now I'm stuck - couldn't find this details anywhere in catalog tables!
>> Is there any
Aleksey Tsalolikhin writes:
> We just noticed our pg_dumps (generated with
> "pg_dump -Fc -n public $our_db_name") does not
> include triggers on tables in database $our_db_name.
-n restricts the dump to objects in the named schema. It's impossible
to evaluate whether there is an issue here, s
-Original Message-
From: pgsql-general-ow...@postgresql.org
[mailto:pgsql-general-ow...@postgresql.org] On Behalf Of Ben Chobot
Sent: Wednesday, November 16, 2011 5:48 PM
To: pgsql-general General
Subject: [GENERAL] insert locking issue for PG 9.0
Our application has a table that looks lik
Hi,
We are using Postgres 8.4.8 and it is a very fine database.
We just noticed our pg_dumps (generated with
"pg_dump -Fc -n public $our_db_name") does not
include triggers on tables in database $our_db_name.
Should it? (We'd like it to, we are counting on pg_dump to
backup all our data, in
Our application has a table that looks like:
create table jobs
(
id int,
first boolean
);
What we need is for the app to be able to shove data into jobs with an assigned
id, and guarantee that first is only true for one id. In other words, we could
easily enforce what we want b
I ran into a rather unusual problem today where Postgres brought down a
database to avoid transaction wraparound in a situation where it doesn't appear
that it should have.
The error in the log is explicit enough...
Nov 16 04:00:03 SRP1 postgres[58101]: [1-1] FATAL: database is not accepting
On Wed, 2011-11-16 at 13:38 -0500, Eliot Gable wrote:
> I am working on a reporting project where I need to generate a report based
> on data from several different network appliances. Each appliance runs a
> PostgreSQL database which houses all of the information for the appliance.
> Further, ther
Konstantin,
Just back from some time off and read this reply.
This was exactly the issue. The superuser "postgres" did not have this
role since this was a dump/restore/upgrade from postgres 8.4. I just
created a new Role and user, and it all worked!
Thanks!
--Sean
On 11/06/2011 06:41 P
On Tue, Nov 15, 2011 at 11:29 AM, Richard Broersma <
richard.broer...@gmail.com> wrote:
> On Tue, Nov 15, 2011 at 8:00 AM, Tarlika Elisabeth Schmitz
> wrote:
> > Interesting. I have previously used the information_schema for similar
> > queries.
> >
> > What are the pros and cons for using either
I am working on a reporting project where I need to generate a report based
on data from several different network appliances. Each appliance runs a
PostgreSQL database which houses all of the information for the appliance.
Further, there are dozens of triggers in the database which fire when
vario
Dhimant Patel wrote:
> I have postgres (PostgreSQL) 9.0.3 running.
> I also created several procedures/functions and now I don't remember the last
> procedure I worked on! - I thought I could always get this from metadata.
>
> Now I'm stuck - couldn't find this details anywhere in catalog tables
We have a couple of clients having problems with the windows user that
the postgres service uses to run changing passwords. They fixed the
windows user password and it worked for a bit and then got reset again.
Client computers are all Windows XP SP3 and the server is Windows Server
2003 stand
On 11/16/11 8:00 AM, Dhimant Patel wrote:
I have postgres *(PostgreSQL) 9.0.3 running.*
I also created several procedures/functions and now I don't remember
the last procedure I worked on! - I thought I could always get this
from metadata.
Now I'm stuck - couldn't find this details anywhere i
I have postgres *(PostgreSQL) 9.0.3 running.*
I also created several procedures/functions and now I don't remember the
last procedure I worked on! - I thought I could always get this from
metadata.
Now I'm stuck - couldn't find this details anywhere in catalog tables!
Is there anyway I can get th
After this discussion and the spin-off discussion on the
hacker list, I wanted to summarize my understanding.
So, what I asked for is relatively inexpensive way to make
copies of an existing database for staging, upgrade tests,
and other activities. There are two approaches to this
sort of replic
> (add-to-list 'auto-mode-alist
> '("/psql.edit.[0-9]+\\'" . sql-mode))
Thanks, Peter!
That's exactly what I was looking for.
--
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general
Hi all,
We have a master and a slave DB server (both PostgreSQL 8.3, Slony 2.0.1).
Maybe we were hasty, because we delete ~18 million rows from a table on
master with one SQL command. Slony log and transfer jobs/transactions to
the slave node, but on the slave node the slony can't do this job. Slo
On Wed, Nov 16, 2011 at 4:58 PM, David Johnston wrote:
> On Nov 15, 2011, at 15:28, Gavin Flower
> wrote:
>
> On 14/11/11 18:35, Amit Dor-Shifer wrote:
>
>
> On Mon, Nov 14, 2011 at 4:29 PM, Amit Dor-Shifer <
> amit.dor.shi...@gmail.com> wrote:
>
>> Hi,
>> I've got this table:
>> create table ph
On Wed, 16 Nov 2011 09:17:45 +0100
Thomas Kellerer wrote:
> Ivan Sergio Borgonovo, 16.11.2011 01:01:
> > test=# begin;
> > create or replace function process_table (
> > action TEXT, v_table_name varchar(100)
> > ) RETURNS BOOLEAN
> > AS $$
> > DECLARE
> >
> > BEGIN
> > return t
Ivan Sergio Borgonovo, 16.11.2011 01:01:
test=# begin;
create or replace function process_table (
action TEXT, v_table_name varchar(100)
) RETURNS BOOLEAN
AS $$
DECLARE
BEGIN
return true;
END;
$$ LANGUAGE plpgsql;
drop function process_table (
action TEXT, v_table_nam
On Tue, 15 Nov 2011 18:48:00 -0700
"J.V." wrote:
> the drop function works when running from a pgAdmin III Sql window
>
> but when I try to do from the command line and script it:
> psql -h $PGHOST -p $PGPORT -d $PGDATABASE -U $PGUSER -c
> "*drop function *"
>
> the above fails.
> It
37 matches
Mail list logo