Re: [GENERAL] Question on a select

2005-01-02 Thread Madison Kelly
Bruno Wolff III wrote: There should be parenthesis around the list to test. WHERE a_name, a_type, a_dir NOT IN ( should be WHERE (a_name, a_type, a_dir) NOT IN ( That did it (I think)! I believe that the NOT IN query should run comparably to the LEFT JOIN example supplied by the other person (at

Re: [GENERAL] Question on a select

2005-01-02 Thread Vincent Hikida
They are all 'not null' and I am trying to do exactly the kind of task you described. I tried the first example on my DB and got a syntax error: tle-bu= SELECT a.file_name, a.file_parent_dir, a.file_type FROM file_info_1 a WHERE NOT EXIST (SELECT NULL FROM file_set_1 b WHERE

Re: [GENERAL] Question on a select

2005-01-02 Thread Vincent Hikida
The indexes are: CREATE INDEX file_info_#_display_idx ON file_info_# (file_type, file_parent_dir, file_name); CREATE INDEX file_set_#_sync_idx ON file_set_# (fs_name, fs_parent_dir, fs_type) Are these not effective for the second query? If not, what should I change or add? If so, would

[GENERAL]

2005-01-02 Thread Joost Kraaijeveld
Hi all, Is it possible to count and display the number of children of a parent in a generic query? parent table: id child table: id, parent_id Example output of the query: parentidnumber_of_children parent1 2 parent2 6 parent3 0 Groeten, Joost Kraaijeveld

Re: [GENERAL] many similar indexbased selects are extremely slow

2005-01-02 Thread Pierre-Frdric Caillaud
I use a bigger psql-table to store information and keep an id-value of how big ? each row in memory of my application for faster access. related to the previous question : are you sure there won't be a day where it won't fit ? My applications is able to calculate a list of needed id's in

Re: [GENERAL] Function Parameters

2005-01-02 Thread Pierre-Frdric Caillaud
Maybe you could use arrays as some function parameters ? Can you explain why you need so many parameters ? On Sat, 1 Jan 2005 22:25:02 -0700, Michael Fuhr [EMAIL PROTECTED] wrote: On Sun, Jan 02, 2005 at 01:31:22AM +, Oluwatope Akinniyi wrote: I tried to create a function with

Re: [GENERAL] many similar indexbased selects are extremely slow

2005-01-02 Thread Pierre-Frdric Caillaud
select field1,field2,field3 from mytable where id=XX; For instance, on my machine : SELECT * FROM bigtable with 2M rows WHERE id IN (list of 500 values) takes 10 ms. ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL

Re: [GENERAL] disabling OIDs?

2005-01-02 Thread Martijn van Oosterhout
On Sat, Jan 01, 2005 at 06:35:30PM -0800, Jeff Davis wrote: On Sun, 2004-12-12 at 20:25 -0800, Lonni J Friedman wrote: OK, thanks. So is there any real benefit in doing this in a generic (non-dspam) sense, or is it just a hack that wouldn't be noticable? Any risks or potential problems

Re: [GENERAL] Question on a select

2005-01-02 Thread Madison Kelly
Vincent Hikida wrote: The indexes are: CREATE INDEX file_info_#_display_idx ON file_info_# (file_type, file_parent_dir, file_name); CREATE INDEX file_set_#_sync_idx ON file_set_# (fs_name, fs_parent_dir, fs_type) Are these not effective for the second query? If not, what should I change

[GENERAL] PostgreSQL 8.0.0 Release Candidate 3

2005-01-02 Thread Marc G. Fournier
As was anticipated, time between Release Candidate 2 and 3 was nice and short, with more changes being made now to Documentation vs Code. A current list of *known* supported platforms can be found at: http://developer.postgresql.org/supported-platforms.html We're always looking to

Re: [GENERAL] Question on a select

2005-01-02 Thread Pierre-Frdric Caillaud
I didn't realize that the order made a difference. A sign of how much learning I need to do. :p For reference, I think 'file_parent_dir' and 'fs_parent_dir' are the most important because I do an 'ORDER BY [fs|file]_parent_dir ASC' on most queries. I've made the changes, thank you

[GENERAL] Shared Sequences?

2005-01-02 Thread C. Duncan Hudson
Is there any way, with PG 8 rc 3, to share a sequence across databases - assuming all databases are on the same machine? Thanks, Dunc ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster

Re: [GENERAL] Shared Sequences?

2005-01-02 Thread Andreas Kretschmer
begin C. Duncan Hudson [EMAIL PROTECTED] wrote: Is there any way, with PG 8 rc 3, to share a sequence across databases - assuming all databases are on the same machine? Thanks, Possibly via contrib/dblink, also on ealier versions. I'm not sure about sequences, but with tables this is

Re: [GENERAL] Large Objects

2005-01-02 Thread Karsten Hilbert
BYTEA is not always pragmatic. What is the file is 100 megs? 256 megs? What is the size when bytea become inafective ? I don't think it's so much a matter of effectiveness, it makes no difference at all in storage space. Ah, thanks, good to know. Something new to learn every day... The

Re: [GENERAL]

2005-01-02 Thread John Sidney-Woollett
Useful to add a title to your messages before you post... How about: select parentid, count(*) as number_of_children from childtable group by parentid order by parentid; If there are parent records that have no children then these will be omitted. The query above totally ignores the parent table

[GENERAL] OS X shared memory problems 8.0rc3

2005-01-02 Thread Timothy Perrigo
I just downloaded and installed RC3 on my OS X system (10.3.7), and I'm getting a shared memory error when trying to run initdb (error message listed below). I received a similar error a few weeks ago after upgrading my OS to 10.3.7, but I was able to get around that by reducing the

Re: [GENERAL] Shared Sequences?

2005-01-02 Thread Michael Fuhr
On Sun, Jan 02, 2005 at 10:44:16AM -0500, C. Duncan Hudson wrote: Is there any way, with PG 8 rc 3, to share a sequence across databases - assuming all databases are on the same machine? As Andreas Kretschmer mentioned, you might be able to use dblink. Why do you want to share a sequence

Re: [GENERAL] PostgreSQL 8.0.0 Release Candidate 3

2005-01-02 Thread Jeff Davis
Does this release incorporate a change to the bgwriter or was it determined to leave it as-is until 8.1? Regards, Jeff Davis On Sun, 2005-01-02 at 10:56 -0400, Marc G. Fournier wrote: As was anticipated, time between Release Candidate 2 and 3 was nice and short, with more changes

Re: [GENERAL] OS X shared memory problems 8.0rc3

2005-01-02 Thread Tom Lane
Timothy Perrigo [EMAIL PROTECTED] writes: I just downloaded and installed RC3 on my OS X system (10.3.7), and I'm getting a shared memory error when trying to run initdb (error message listed below). I received a similar error a few weeks ago after upgrading my OS to 10.3.7, but I was able

Re: [GENERAL] Select number of children of a parent query

2005-01-02 Thread Joost Kraaijeveld
Hi John, John Sidney-Woollett schreef: Useful to add a title to your messages before you post... It escaped before finishing. How about: select parentid, count(*) as number_of_children from childtable group by parentid order by parentid; It works but can you tell me why this works?

Re: [GENERAL] Function Parameters

2005-01-02 Thread David Fetter
On Sun, Jan 02, 2005 at 01:31:22AM +, Oluwatope Akinniyi wrote: Hi, Compliments of the season. I tried to create a function with about 60 input parameters and got an error message that a function cannot take more than 32 parameters. Generally, a function with that many input

Re: [GENERAL] Shared Sequences?

2005-01-02 Thread C. Duncan Hudson
Michael Fuhr wrote: On Sun, Jan 02, 2005 at 10:44:16AM -0500, C. Duncan Hudson wrote: Is there any way, with PG 8 rc 3, to share a sequence across databases - assuming all databases are on the same machine? As Andreas Kretschmer mentioned, you might be able to use dblink. Why do you want

Re: [GENERAL] Function Parameters

2005-01-02 Thread Michael Fuhr
On Sun, Jan 02, 2005 at 12:56:52PM -0800, David Fetter wrote: Other people have made suggestions about recompiling PostgreSQL, hacking the source code, etc., etc. These are things you should only attempt when you are absolutely certain that there is no other way to do what you need to do

Re: [GENERAL] Select number of children of a parent query

2005-01-02 Thread John Sidney-Woollett
You might need to read a good SQL primer to get a full explanation of this feature. Reading from the docs, http://www.postgresql.org/docs/7.4/interactive/sql-select.html quote The optional GROUP BY clause has the general form GROUP BY expression [, ...] GROUP BY will condense into a single row

Re: [GENERAL] Shared Sequences?

2005-01-02 Thread Ragnar HafstaĆ°
On Sun, 2005-01-02 at 16:19 -0500, C. Duncan Hudson wrote: [about databases sharing a sequence] I have 3 instances of the application (each for a different business unit) and I don't want them generating the same numbers for different things. I want the numbers, across

[GENERAL] Index, Tablespace and performance

2005-01-02 Thread alexandre::aldeia digital
Hi, I have a 4 x SCSI in RAID 10 (PG 7.4.6) with a regular performance. My database have 55 Gb of data. In PG 8, moving the indexes to a separeted disk (or array) can (generally) improve the performance if the system make a heavy use of indexes ? Thanks Alexandre ---(end

Re: [GENERAL] OS X shared memory problems 8.0rc3

2005-01-02 Thread Timothy Perrigo
On Jan 2, 2005, at 12:58 PM, Tom Lane wrote: Timothy Perrigo [EMAIL PROTECTED] writes: I just downloaded and installed RC3 on my OS X system (10.3.7), and I'm getting a shared memory error when trying to run initdb (error message listed below). I received a similar error a few weeks ago after

Re: [GENERAL] OS X shared memory problems 8.0rc3

2005-01-02 Thread Tom Lane
Timothy Perrigo [EMAIL PROTECTED] writes: On Jan 2, 2005, at 12:58 PM, Tom Lane wrote: I think you probably are trying to run two postmasters at once. You really need to increase the OS X memory limits, instead. No, I just ran pg_ctl status to check, and here was the output: pg_ctl: neither

[GENERAL] Joined delete

2005-01-02 Thread Madison Kelly
Hi all, After all the great help I got from you all I managed to finish what I was struggling with. The last thing I need to do should be pretty simple. :) I use this query to return values from one table that don't exits in another table: SELECT a.fs_name, a.fs_parent_dir, a.fs_type FROM

[GENERAL] function in postgres

2005-01-02 Thread vinita bansal
Hi, The function CHAR in db2 returns a fixed length character string representation of an integer number.What is the corresponding function in Postgres? Regards, Vinita Bansal _ NRIs send 10 photos FREE to India.