Re: [GENERAL] how to return a result set from a stored procedure

2005-06-15 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2005-06-11 08:44:32 -0400: > Hi everybody > > I am trying to write a stored procedure that returns a result set but it is > not working > this is the function: > /// > CREATE OR REPLACE FUNCTION > remisiones.fn_get_total_remitidoxprovision1("numeric") > > RETURNS SETOF reco

[GENERAL] Best approach setting up PostgreSQL

2005-06-15 Thread Danny Gaethofs
Dear all, I am having multiple applications that use PostgreSQL as their database server. These applications are not related and contains different functionality. In the past I have been creating a database in the same database cluster. Now I am wondering whether it would not be better to have t

[GENERAL] Deadlock Problem

2005-06-15 Thread Gavin Love
I am getting a number of deadlock errors in my log files and I was wondering if anyone knows how I can stop them. Query failed: ERROR: deadlock detected DETAIL: Process 11931 waits for ShareLock on transaction 148236867; blocked by process 11932. Process 11932 waits for ShareLock on transact

Re: [GENERAL] Deadlock Problem

2005-06-15 Thread Csaba Nagy
Gavin, Are you ordering the updates by id inside one transaction ? You should order the execution of the statements by id inside a transaction, and the deadlocks should go away. HTH, Csaba. On Wed, 2005-06-15 at 13:10, Gavin Love wrote: > I am getting a number of deadlock errors in my log files

Re: [GENERAL] user groups

2005-06-15 Thread Zlatko Matić
Hi. Thank you for information. How can I dump_all from pgAdmin III ? Thanks. - Original Message - From: "John DeSoi" <[EMAIL PROTECTED]> To: "Zlatko Matić" <[EMAIL PROTECTED]> Cc: Sent: Wednesday, June 15, 2005 1:25 AM Subject: Re: [GENERAL] user groups On Jun 14, 2005, at 6:17 PM,

Re: [GENERAL] How to set an expiration date for a WHOLE user account

2005-06-15 Thread Zlatko Matić
Hi. Concerning Együd's question, I also wanted to ask about setting expiration date for database. But, I would like to set validity in sense of certain actions. For example, I would like to prevent adding new records after expiration, but would allow viewing existing records Is there any w

Re: [GENERAL] Best approach setting up PostgreSQL

2005-06-15 Thread Changyu Dong
Hi, Actually, if you've multiple installations of postgreSQLs in different locations, you can start them simultaneously. And for different clients to connect to different server instances, you should change the default port setting. Changyu --- Danny Gaethofs <[EMAIL PROTECTED]> wrote: > Dear a

Re: [GENERAL] Deadlock Problem

2005-06-15 Thread Gavin Love
Hi Csaba, I am not ordering them by ID as in reality the where condition is more complex than in my example UPDATE stats SET click_count = click_count+1 WHERE month = '06' AND year = '2005' AND type = 'a' AND id = '123' AND count_type = 'b'"; Can you explain why sorting by ID would make a d

Re: [GENERAL] Deadlock Problem

2005-06-15 Thread Csaba Nagy
Because I guess id is your primary key, and that would make your transactions always update the same rows in the same order. It really doesn't matter if you have other criteria in the where clause, the issuing order of the statements is the problem. Deadlock will occur if 2 concurrent transactions

[GENERAL] Consultants

2005-06-15 Thread John Wells
Guys, My company is migrating from a Progress-based ERP system to a PostgreSQL based system. We know PostgreSQL from a development standpoint, but not from an admin perspective. I'd like to hire a consultant to help us with some important projects, specifically benchmarking Progress versus Postg

Re: [GENERAL] Consultants

2005-06-15 Thread Richard Huxton
John Wells wrote: Can anyone recommend a very knowledgeable, experienced (yet reasonable) PostgreSQL consulting firm? You'll be wanting to state your country/region too. -- Richard Huxton Archonet Ltd ---(end of broadcast)--- TIP 7: don't f

Re: [GENERAL] Consultants

2005-06-15 Thread John Wells
Richard Huxton said: > John Wells wrote: >> >> Can anyone recommend a very knowledgeable, experienced (yet reasonable) >> PostgreSQL consulting firm? > > You'll be wanting to state your country/region too. The company is located in Greensboro, NC, USA. Although on-site consulting is preferred, it'

[GENERAL] slow parsing of queries with joins

2005-06-15 Thread Ilja Golshtein
Hello! I faced with the fact PG parses some of my queries very slowly. I mean VERY VERY slowly (for example, MS SQL is about 50 times faster here). I used this script for small investigation. == #!/usr/bin/perl use IPC::Open3; my $cmd = "psql -d template1"; sub execute { my($txt, $i) =

Re: [GENERAL] Consultants

2005-06-15 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Wed, 15 Jun 2005, John Wells wrote: Can anyone recommend a very knowledgeable, experienced (yet reasonable) PostgreSQL consulting firm? http://www.postgresql.org/support/professional_support Regards, - -- Devrim GUNDUZ devrim~gunduz.org

Re: [GENERAL] Database became very slow(Help PLS)

2005-06-15 Thread Scott Marlowe
On Tue, 2005-06-14 at 22:55, go wrote: > Hi, > > After about 2 month of greate work, my database (running under > PG 8.01 on Win2000) very slow.Reindexing all tables, Vacuum Full,Freeze > and Analyze didn't help(i did it from pg_admin III). > But after dropdb and pg_restore it become fast agai

[GENERAL] Reporting tools

2005-06-15 Thread Hrishikesh Deshmukh
Hi All, Are there better open source reporting tools than openrpt, agata? Thanks, Hrishi ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Re: [GENERAL] Current transaction ID?

2005-06-15 Thread Scott Marlowe
On Tue, 2005-06-14 at 19:03, Bruce Momjian wrote: > Steve - DND wrote: > > > > Let's pretend I don't know how to do that. :) Do you have a > > > link to a page > > > > in the manual that describes this process, or can you give me a quick > > > > runthrough of what you're talking about? > > > > > >

Re: [GENERAL] How to set an expiration date for a WHOLE user account

2005-06-15 Thread Bruno Wolff III
On Wed, Jun 15, 2005 at 13:34:39 +0200, Zlatko Mati? <[EMAIL PROTECTED]> wrote: > Hi. > Concerning Együd's question, I also wanted to ask about setting expiration > date for database. But, I would like to set validity in sense of certain > actions. > For example, I would like to prevent adding

[GENERAL] Postgresql performance on Opteron 8 CPU

2005-06-15 Thread Ericson Smith
Hi, We've been using a 4 CPU Opteron (16GB) for the past several months, and have now upgraded to an 8 CPU machine with 32GB. Basically, we've taken the postgresql.conf from the 4 way, and used that in the 8 way without making any changes. Shared memory for postgresql in both machines is 256M

Re: [GENERAL] Deadlock Problem

2005-06-15 Thread Tom Lane
Csaba Nagy <[EMAIL PROTECTED]> writes: >> Can you explain why sorting by ID would make a difference as I don't >> understand why what you are suggesting should make a difference? > > Because I guess id is your primary key, and that would make your > transactions always update the same rows in the

Re: [GENERAL] Reporting tools

2005-06-15 Thread Moises Alberto Lindo Gutarra
for java programming, yes, it's ireport that handles jasperreport engine. 2005/6/15, Hrishikesh Deshmukh <[EMAIL PROTECTED]>: > Hi All, > > Are there better open source reporting tools than openrpt, agata? > > Thanks, > Hrishi > > ---(end of broadcast)---

Re: [GENERAL] Deadlock Problem

2005-06-15 Thread Gavin Love
If the deadlocks occur because different transactions actually try to update the same rows concurrently, then this is an appropriate solution. However I wonder if Gavin is getting bitten by foreign key deadlocks. Is there any foreign key reference from the stats table to other tables? Tom, The

Re: [GENERAL] Reporting tools

2005-06-15 Thread Steve Atkins
On Wed, Jun 15, 2005 at 09:51:53AM -0400, Hrishikesh Deshmukh wrote: > Hi All, > > Are there better open source reporting tools than openrpt, agata? Not unless you like Java. If Java is your thing then JasperReports (and it's various GUI designers) aren't bad, but it looks like BIRT (http://www.

[GENERAL] 8.03 postgres install error

2005-06-15 Thread Prasad Duggineni
I am getting the following error when i try to install the postgres 8.03 . It seems to be problem with the installing postgres libs. Plesae advice me to fix this problem.   warning: postgresql-libs-8.0.3-1PGDG.i686.rpm: V3 DSA signature: NOKEY, key ID 748f7d0eerror: Failed dependencies: 

Re: [GENERAL] slow parsing of queries with joins

2005-06-15 Thread Tom Lane
"Ilja Golshtein" <[EMAIL PROTECTED]> writes: > I faced with the fact PG parses some of my queries very slowly. > I mean VERY VERY slowly (for example, MS SQL is about 50 times > faster here). > I used this script for small investigation. Seems to be mostly fixed already. Using your script, I ge

[GENERAL] changing the sequence for a table

2005-06-15 Thread Cedric BRINER
hi, let me explain what I have done, and what I'd like to do with a small example: create table test (id serial, nom varchar(32)); INSERT INTO test ("nom") values ('cedric'); INSERT INTO test ("nom") values ('felix'); INSERT INTO test ("nom") values ('julien'); create table new_test (id serial,

Re: [GENERAL] 8.03 postgres install error

2005-06-15 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Wed, 15 Jun 2005, Prasad Duggineni wrote: I am getting the following error when i try to install the postgres 8.03 . It seems to be problem with the installing postgres libs. Plesae advice me to fix this problem. warning: postgresql-libs

[GENERAL] retrieving information about users and groups

2005-06-15 Thread =?iso-8859-2?Q?Zlatko_Mati=E6?=
Hi. I would like to implement simple users/user groups administration from MS Access. I have already set user groups and permissions to different objects inside the database. Now, I would like to enable creating new users and putting them in previosly pre-defined groups, through Access inter

[GENERAL] PostgreSQL Client Aplications ?

2005-06-15 Thread =?iso-8859-2?Q?Zlatko_Mati=E6?=
Hello.   Till now I've been working with Postgres only through pgAdminIII. Postgres is installed on WIndows XP. Now I need to use pg_dumpall. I have found folder with different Postgres aplications, placed in C:\Program Files\PostgreSQL\8.0\bin. When I double-click on any of them, I am prompt

[GENERAL] enebling regular user to create new users ?

2005-06-15 Thread =?iso-8859-2?Q?Zlatko_Mati=E6?=
Hi. I know that superusers are allowed to do everything on the database, but I consider this as dangerous. I want to  have some user group with rights of creating new users and giving them some authorizations, but without such wide power as superusers have. So, I was thinking about two poss

Re: [GENERAL] changing the sequence for a table

2005-06-15 Thread Richard Huxton
Cedric BRINER wrote: the idea is to drop the ``old_test'' table. But before doing this, > I'd like to alter the table ``test'' to use the sequence > ``test_id_seq'' instead of ``test_new_seq_id''? ALTER TABLE new_table ALTER COLUMN my_column DROP DEFAULT; ALTER TABLE new_table ALTER COLUMN my

[GENERAL] vacuumdb suggestions?

2005-06-15 Thread David Siebert
I have three scripts that I am running to do pg_dumpall and a vacuum on my server. one is run every night except Sundays. one is run every Sunday night. one is run the first of each month. After I ftp the backup to a standby server the vacuum is run. The database is pretty small it only grows by

Re: [GENERAL] postgresql rpms (7.4.2, 7.4.5, 7.4.8) for redhat 8.0

2005-06-15 Thread stig erikson
Could you please sign them with your PGP key and upload them again? I think I can upload them to main FTP site. do i do that with rpm or can i just sign them and provide the signautres in textfiles next to the rpm files? ---(end of broadcast)---

Re: [GENERAL] enebling regular user to create new users ?

2005-06-15 Thread Richard Huxton
Zlatko Matić wrote: Hi. I know that superusers are allowed to do everything on the database, but I consider this as dangerous. I want to have some user group with rights of creating new users and giving them some authorizations, but without such wide power as superusers have. So, I was thinking

Re: [GENERAL] PostgreSQL Client Aplications ?

2005-06-15 Thread Richard Huxton
Zlatko Matić wrote: Hello. Till now I've been working with Postgres only through pgAdminIII. Postgres is installed on WIndows XP. Now I need to use pg_dumpall. I have found folder with different Postgres aplications, placed in C:\Program Files\PostgreSQL\8.0\bin. When I double-click on any of th

Re: [GENERAL] enebling regular user to create new users ?

2005-06-15 Thread Berend Tober
Zlatko Matić wrote: I know that superusers are allowed to do everything on the database, but I consider this as dangerous. I want to have some user group with rights of creating new users and giving them some authorizations, but without such wide power as superusers have. So, I was thinking

Re: [GENERAL] PostgreSQL Client Aplications ?

2005-06-15 Thread Scott Marlowe
On Wed, 2005-06-15 at 10:55, Richard Huxton wrote: > Zlatko Matić wrote: > > Hello. > > > > Till now I've been working with Postgres only through pgAdminIII. > > Postgres is installed on WIndows XP. Now I need to use pg_dumpall. I > > have found folder with different Postgres aplications, placed i

[GENERAL] plpgsql cursors, fetching more than one row

2005-06-15 Thread Magnus Naeslund(t)
I was thinking of using cursors as a paging mechanism for an application. Let's say I need to fetch from a table. If I use these commands from the client it works: BEGIN WORK; DECLARE my_cursor CURSOR FOR SELECT * FROM test1 ORDER BY id ASC FOR READ ONLY; MOVE IN my_cursor; FETCH FROM my_c

Re: [GENERAL] PostgreSQL Client Aplications ?

2005-06-15 Thread David Siebert
Richard Huxton wrote: Zlatko Matić wrote: Hello. Till now I've been working with Postgres only through pgAdminIII. Postgres is installed on WIndows XP. Now I need to use pg_dumpall. I have found folder with different Postgres aplications, placed in C:\Program Files\PostgreSQL\8.0\bin. When I d

Re: [GENERAL] enebling regular user to create new users ?

2005-06-15 Thread Tom Lane
Richard Huxton writes: > Zlatko Matiæ wrote: >> I was thinking about two possible scenarios: a) to allow regular users >> to create new users b) to restrict superuser's permissions >> >> What is possible and what do you suggest ? > Neither is possible directly. (B) means they're not a superuser

Re: [GENERAL] Current transaction ID?

2005-06-15 Thread Alvaro Herrera
On Tue, Jun 14, 2005 at 07:41:11PM -0400, Bruce Momjian wrote: > Steve - DND wrote: > > Simple question I'm sure, but how can I get the transaction ID that a query > > is currently running in? I can find all kinds of documentation talking about > > transaction ids, but nothing about how to get the

Re: [GENERAL] enebling regular user to create new users ?

2005-06-15 Thread Matt Miller
On Wed, 2005-06-15 at 12:50 -0400, Tom Lane wrote: > I might look at > adding that frammish into it Frammish? ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

[GENERAL] plpgsql - TIMESTAMP variables in EXTRACT

2005-06-15 Thread Matthew Phillips
Hi all, I have the following in a plpgsql proc on 7.3.4: DECLARE ... curTime TIMESTAMP; ppsCnt INT; BEGIN ... -- this works SELECT INTO curTime localtimestamp; -- get unix seconds from current time (doesn't work) SELECT INTO ppsCnt EXTRACT (EPOCH FROM TIMESTAMP curTime ); -- p

[GENERAL] graphic client

2005-06-15 Thread uruz
hi can someone send me a link to a graphical client for postgre? i use suse 9.2 and postgre 8 thx uruz ---(end of broadcast)--- TIP 8: explain analyze is your friend

Re: [GENERAL] graphic client

2005-06-15 Thread Devrim GUNDUZ
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, On Wed, 15 Jun 2005, uruz wrote: can someone send me a link to a graphical client for postgre? i use suse 9.2 and postgre 8 I'd offer pgadmin3: http://www.pgadmin.org Also, Aquafold Data Studio is a powerfult client for PostgreSQL (and for

Re: [GENERAL] plpgsql - TIMESTAMP variables in EXTRACT

2005-06-15 Thread Stephan Szabo
On Wed, 15 Jun 2005, Matthew Phillips wrote: > Hi all, > > I have the following in a plpgsql proc on 7.3.4: > > > DECLARE > ... > curTime TIMESTAMP; > ppsCnt INT; > > BEGIN > ... > > -- this works > SELECT INTO curTime localtimestamp; > > -- get unix seconds from current time (doesn't work) > SE

Re: [GENERAL] graphic client

2005-06-15 Thread Guy Rouillier
uruz wrote: > hi > can someone send me a link to a graphical client for postgre? > i use suse 9.2 and postgre 8 I don't know about postgre, but for PostgreSQL, did you look at the web site before asking? I clicked the download link (http://www.postgresql.org/download/) on the home page and the fi

Re: [GENERAL] enebling regular user to create new users ?

2005-06-15 Thread Richard Huxton
Tom Lane wrote: Richard Huxton writes: Zlatko Matiæ wrote: I was thinking about two possible scenarios: a) to allow regular users to create new users b) to restrict superuser's permissions What is possible and what do you suggest ? Neither is possible directly. (B) means they're not a su

Re: [GENERAL] return two elements

2005-06-15 Thread Alvaro Herrera
On Fri, Jun 10, 2005 at 02:24:40PM +0200, "Rodríguez Rodríguez, Pere" wrote: > I don't know that it happens with my email I will change the email of my > subscription. > > The examples are very interesting for my, and Alvaro Herrera's comments too. > > In reference to INOUT/OUT params and return

Re: [GENERAL] PostgreSQL Certification

2005-06-15 Thread Ian Harding
I just took the test. It did for me what I thought it would do, it made me read the docs from cover to cover (very quickly, and not the appendices) with a firm deadline. If I hadn't scheduled the test, I would not have done that. I learned some things. Here are my comments on the test as an eva

Re: [GENERAL] plpgsql - TIMESTAMP variables in EXTRACT

2005-06-15 Thread Matthew Phillips
Stephan, Thanks, this does work. I assume that the usage of 'TIMESTAMP' only applies when a literal representation of the date is given. Matthew Stephan Szabo wrote: On Wed, 15 Jun 2005, Matthew Phillips wrote: Hi all, I have the following in a plpgsql proc on 7.3.4: DECLARE ... curTime T

Re: [GENERAL] INHERITS and planning

2005-06-15 Thread Simon Riggs
On Thu, 2005-06-09 at 21:30 -0400, Edmund Dengler wrote: > We have 2 base tables, and use INHERITS to partition the data. When we get > around 2000-2200 sub-tables (approx 1000-1100 per base table), planning a > SELECT statement on the base table (ie, to search all sub-tables) will > start slowing

Re: [HACKERS] [GENERAL] INHERITS and planning

2005-06-15 Thread Simon Riggs
On Fri, 2005-06-10 at 02:10 -0400, Tom Lane wrote: > What I see in the profile is > > % cumulative self self total > time seconds secondscalls s/call s/call name > 42.04 15.5815.58 9214 0.00 0.00 list_nth_cell > 20.29 2

[GENERAL] Installation on latest version of Suse Linux

2005-06-15 Thread Nico Callewaert
Hi,   I'm completely new to PostgreSQL.  I don't have any idea how to install it on a Suse Linux machine.  Could somebody provide me installation instructions ?   Many thanks in advance,   Nico Callewaert Discover Yahoo! Have fun online with music videos, cool games, IM & more. Check it out!

Re: [GENERAL] Installation on latest version of Suse Linux

2005-06-15 Thread Scott Marlowe
On Wed, 2005-06-15 at 16:54, Nico Callewaert wrote: > Hi, > > I'm completely new to PostgreSQL. I don't have any idea how to > install it on a Suse Linux machine. Could somebody provide me > installation instructions ? > > Many thanks in advance, > Insert your suse installation medium, and

Re: [GENERAL] Installation on latest version of Suse Linux

2005-06-15 Thread Geoffrey
Nico Callewaert wrote: Hi, I'm completely new to PostgreSQL. I don't have any idea how to install it on a Suse Linux machine. Could somebody provide me installation instructions ? SuSE provides Postgresql rpms, simply use YAST to install new software. -- Until later, Geoffrey -

Re: [GENERAL] PostgreSQL Certification

2005-06-15 Thread Tatsuo Ishii
Hi, Thank you for taking the test and giving comments. > I just took the test. It did for me what I thought it would do, it > made me read the docs from cover to cover (very quickly, and not the > appendices) with a firm deadline. If I hadn't scheduled the test, I > would not have done that. I

[GENERAL] Executing SQL Script

2005-06-15 Thread Jamie Deppeler
This is a simple question what is the best way to execute a SQL script, this script will create schemas and tables for a database i created. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]

Re: [HACKERS] [GENERAL] INHERITS and planning

2005-06-15 Thread Tom Lane
Simon Riggs <[EMAIL PROTECTED]> writes: > Looks bad... but how does it look for 1000 inherited relations? My > feeling is that we should not be optimizing the case above 1000 > relations. That many partitions is very unwieldy. Well, it's not so much that I care about queries with 1000+ relations,

Re: [HACKERS] [GENERAL] INHERITS and planning

2005-06-15 Thread Christopher Kings-Lynne
Well, it's not so much that I care about queries with 1000+ relations, as that this is a good way to stress-test the code and find out where the performance issues are. There are many thousand lines of code that can never be performance-sensitive, but to expose the ones that are it helps to push

Re: [HACKERS] [GENERAL] INHERITS and planning

2005-06-15 Thread Greg Stark
Simon Riggs <[EMAIL PROTECTED]> writes: > If you really do need that many, you can go to the trouble of grouping > them in two levels of nesting, so you have a root table, multiple month > tables and then each month table with multiple day tables (etc). I wonder if testing deeply nested inherita

Re: [GENERAL] Executing SQL Script

2005-06-15 Thread Richard Huxton
Jamie Deppeler wrote: This is a simple question what is the best way to execute a SQL script, this script will create schemas and tables for a database i created. psql -f my_script_file -U username mydbname or psql -U username mydbname < my_script_file -- Richard Huxton Archonet Ltd -

Re: [GENERAL] Installation on latest version of Suse Linux

2005-06-15 Thread Nico Callewaert
Hi !,   Thanks for all the tips   Best regards, Nico CallewaertScott Marlowe <[EMAIL PROTECTED]> wrote: On Wed, 2005-06-15 at 16:54, Nico Callewaert wrote:> Hi,> > I'm completely new to PostgreSQL. I don't have any idea how to> install it on a Suse Linux machine. Could somebody provide me> ins

[GENERAL] DATATYPE for HEX

2005-06-15 Thread Ilja Golshtein
Hello! I am choosing the best (fastest and smallest) datatype for storing some 16-byte length application-level binary identifiers. This data probably must be indexed. The only operation I really need is comparision (equal or not) and, probably, ORDER BY. Most natural type BINARY(16) is absent