Re: [GENERAL] To OID or not to OID

2004-09-28 Thread Neil Conway
On Wed, 2004-09-29 at 00:23, Doug McNaught wrote: > Nothing in PG depends on user tables having an OID column. They used > to be a way to get a primary key before SERIAL came along, but they > are now deprecated for user tables. WITHOUT OIDS will be the default > in a future release. Indeed, tha

Re: [GENERAL] Indexes on Expressions -- Parentheses

2004-09-28 Thread Stephan Szabo
[EMAIL PROTECTED] On Tue, 28 Sep 2004, Thomas F.O'Connell wrote: > From 11.5 in the docs: > > "The syntax of the CREATE INDEX command normally requires writing > parentheses around index expressions, as shown in the second example. > The parentheses may be omitted when the expression is just a f

Re: [GENERAL] Controlling order of evaluation?

2004-09-28 Thread Andre Maasikas
Jerry LeVan wrote: I have hoped that select * from annual_report(2003) union select * from annual_profit_loss(2003) would print the last select last ;( but it inserts the last selection alphabetically into the rows of the annual_report depending on the label field... I suppose I could use a label "

[GENERAL] Indexes on Expressions -- Parentheses

2004-09-28 Thread Thomas F . O'Connell
>From 11.5 in the docs: "The syntax of the CREATE INDEX command normally requires writing parentheses around index expressions, as shown in the second example. The parentheses may be omitted when the expression is just a function call, as in the first example." But when I try this: db=# CREATE I

Re: [GENERAL] Controlling order of evaluation?

2004-09-28 Thread Russell Smith
On Wed, 29 Sep 2004 08:16 am, Jerry LeVan wrote: > I have an srf sql function "annual_report()" that > as 14 columns, a category, 12 month numeric columns, and a total > numeric column. > > The function finds monthly totals for each category (which is the > target of "order by") > and the grand

Re: [GENERAL] Foreign key order evaluation

2004-09-28 Thread Michael Fuhr
On Tue, Sep 28, 2004 at 01:35:32PM -0400, Shawn Chisholm wrote: > create table locations > ( > id serial, > address varchar, > ... > ) > > -- In the real application there are 5 tables like this > create table a1 > ( > from int, > to int, > ... > FOREIGN KEY (from) r

Re: [GENERAL] Foreign key order evaluation

2004-09-28 Thread Michael Fuhr
On Tue, Sep 28, 2004 at 10:27:21PM +, Randy Yates wrote: > I see the light. You mean it would be nice to be able to have a > "LOCK-FOR-UPDATE-ONLY" > lock as well as a "LOCK-FOR-UPDATE-OR-READ" lock, but all you have now is > "LOCK-FOR-UPDATE-OR-READ" and that gets applied even when you don't

Re: [GENERAL] doubt about the database

2004-09-28 Thread Scott Marlowe
On Sun, 2004-09-26 at 01:49, maridu h.s.n.v.prasad wrote: > subscribe > end > > hai sir > i am using the postgresql 7.2 my doubt is > what is the command of to see the list of databases > i create a database named "jntuoes" > database created it's displayed > but i want to know the command >

Re: [GENERAL] porting a full Ms Sql Server to postgres

2004-09-28 Thread Ian Harding
It's not possible to easily port functions and triggers. Tables, views and data are pretty easy. <<< <[EMAIL PROTECTED]> 9/26 4:10p >>> Hi, I'm looking for details, or tools about porting a full Ms Sql Server 2000 database to Postgres on Linux. Is this possible? We have the whole nine yards

Re: [GENERAL] Foreign key order evaluation

2004-09-28 Thread Randy Yates
[EMAIL PROTECTED] (Stephan Szabo) writes: > On Tue, 28 Sep 2004, Randy Yates wrote: > >> Michael Fuhr <[EMAIL PROTECTED]> writes: >> >> > On Tue, Sep 28, 2004 at 01:30:08PM +, Randy Yates wrote: >> >> Randy Yates <[EMAIL PROTECTED]> writes: >> >> > >> >> > I'm confused. Where is the lock? Is i

Re: [GENERAL] Pgsql 7.4/8.0 on IA64 HP-UX 11i?

2004-09-28 Thread Ed L.
On Tuesday September 28 2004 1:12, Ed L. wrote: > > The HPUX gurus on http://forums1.itrc.hp.com testify that kernel caches > above approximately 600MB are counter-productive to performance. But we > have 16GB of RAM we definitely want to utilize for caching. Therefore, > we've set the kernel cac

[GENERAL] Controlling order of evaluation?

2004-09-28 Thread Jerry LeVan
I have an srf sql function "annual_report()" that as 14 columns, a category, 12 month numeric columns, and a total numeric column. The function finds monthly totals for each category (which is the target of "order by") and the grand total for the specified year. I have another sql function ann

Re: [GENERAL] Syntax Issue in Trigger Function??

2004-09-28 Thread Tom Lane
Andre Maasikas <[EMAIL PROTECTED]> writes: > Without escaping it looks like v_ref := ''/''; > dividing 2 empty strings, and indeed gives > division by zero in psql. What dividing 2 strings is actually > supposed to mean is not evident form the docs in the first glance. This is a pet peeve of mine

Re: Null comparisons (was Re: [GENERAL] checksum)

2004-09-28 Thread Greg Stark
Marco Colombo <[EMAIL PROTECTED]> writes: > (a = b or (a is null and b is null)) > > that raises a flag for me. It seems that NULL is used as a special value, > which is not. Well, as I said, it raised a flag for me too. However, it's not good to be too dogmatic about things. General rules are

Re: [GENERAL] Foreign key order evaluation

2004-09-28 Thread Stephan Szabo
On Tue, 28 Sep 2004, Randy Yates wrote: > Michael Fuhr <[EMAIL PROTECTED]> writes: > > > On Tue, Sep 28, 2004 at 01:30:08PM +, Randy Yates wrote: > >> Randy Yates <[EMAIL PROTECTED]> writes: > >> > > >> > I'm confused. Where is the lock? Is it on the 1 record in the model table? > > > > Yes. >

Re: [GENERAL] Syntax Issue in Trigger Function??

2004-09-28 Thread Andre Maasikas
[EMAIL PROTECTED] wrote: In Postgres 7.3.5 - When we try to insert a new record into our parties.party table which is then meant to fire off a trigger to update a column in the table with some de-normalised information, we get the following error: ERROR: FLOATING POINT EXCEPTION! The last floatin

[GENERAL] PostgreSQL Installation Question

2004-09-28 Thread Geisler, Jim
Title: Message I am trying to create an installer that will run PostgreSQL as a service onto a Windows machine( 2000 or Server 2003). The problem that I am having is that I need to have the database be initialized by a restricted windows user.  However, I do not want to demand that the user

Re: [GENERAL] Pgsql 7.4/8.0 on IA64 HP-UX 11i?

2004-09-28 Thread Ed L.
On Tuesday September 28 2004 1:18, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > >> I wouldn't panic. 99% of the value of a 64-bit box for database work > >> is that you can handle more than 4Gb worth of RAM for disk cache. > >> Since in Postgres's worldview most of the disk caching is

Re: [GENERAL] Pgsql 7.4/8.0 on IA64 HP-UX 11i?

2004-09-28 Thread Tom Lane
"Ed L." <[EMAIL PROTECTED]> writes: >> I wouldn't panic. 99% of the value of a 64-bit box for database work >> is that you can handle more than 4Gb worth of RAM for disk cache. Since >> in Postgres's worldview most of the disk caching is supposed to be done >> by the kernel, it really matters not

Re: [GENERAL] Pgsql 7.4/8.0 on IA64 HP-UX 11i?

2004-09-28 Thread Ed L.
On Tuesday August 17 2004 10:38, Tom Lane wrote: > "Ed L." <[EMAIL PROTECTED]> writes: > > $ file `which psql` > > /opt/pgsql/postgresql-8.0.0beta1/bin/psql: ELF-32 executable object > > file - IA64 > > > > This is the same for *many* of the executables in /bin. Does this mean > > it is a 32-b

Re: [GENERAL] Foreign key order evaluation

2004-09-28 Thread Randy Yates
Michael, Thank you for your responses. Further questions below. Michael Fuhr <[EMAIL PROTECTED]> writes: > On Tue, Sep 28, 2004 at 01:30:08PM +, Randy Yates wrote: >> Randy Yates <[EMAIL PROTECTED]> writes: >> > >> > I'm confused. Where is the lock? Is it on the 1 record in the model table?

[GENERAL]

2004-09-28 Thread Wayne Unruh
subscribe end _ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/ ---(end of broadcast)--- TIP 9: the planner will igno

Re: [GENERAL] Foreign key order evaluation

2004-09-28 Thread Shawn Chisholm
Here is an example, pardon syntax sloppiness: create table locations ( id serial, address varchar, ... ) -- In the real application there are 5 tables like this create table a1 ( from int, to int, ... FOREIGN KEY (from) references locations(id), FOREIGN KEY (to)

Re: [GENERAL] Custom Functions

2004-09-28 Thread Doug McNaught
Matthew Metnetsky <[EMAIL PROTECTED]> writes: > On Tue, 2004-09-28 at 10:55, Katsaros Kwn/nos wrote: >> > So, does anyone know of (or have) good examples of queries within >> > functions (and returning sets of data)? >> >> I'm not very experienced in PostgreSQL but maybe SPI functions is what you

Re: [GENERAL] Réf. : Re: R?f. : Re:

2004-09-28 Thread Gaetano Mendola
[EMAIL PROTECTED] wrote: Thanks for your help, I haven't tested with cc_r but with VisualAge C from IBM , and "configure CC=/usr/vac/bin/cc --enable-thread-safety" works fine. But when compiling, link edition fails, "ld" doesn't find threads entries (like pthreads_mutex_lock...). Each compilation t

Re: [GENERAL] Custom Functions

2004-09-28 Thread Matthew Metnetsky
On Tue, 2004-09-28 at 10:55, Katsaros Kwn/nos wrote: > > So, does anyone know of (or have) good examples of queries within > > functions (and returning sets of data)? > > I'm not very experienced in PostgreSQL but maybe SPI functions is what you > need. Yeah I took a look at them, but I'm not sol

Re: Null comparisons (was Re: [GENERAL] checksum)

2004-09-28 Thread Marco Colombo
On Mon, 27 Sep 2004, David Helgason wrote: On 27. sep 2004, at 22:08, Dean Gibson (DB Administrator) wrote: Greg Stark wrote on 2004-09-27 08:17: Stephan Szabo <[EMAIL PROTECTED]> writes: >> On Sun, 26 Sep 2004 20:16:52 +0200, David Helgason <[EMAIL PROTECTED]> wrote: >>> On a similar note, I've f

Re: [GENERAL] Getting an out of memory failure.... (long email)

2004-09-28 Thread Gaetano Mendola
Sean Shanny wrote: Tom, The Analyze did in fact fix the issue. Thanks. --sean Given the fact that you are using pg_autovacuum, you have to consider a few points: 1) Is out there a buggy version that will not analyze big tables. 2) The autovacuum fail in scenarios with big tables not eavy updated,

Re: [GENERAL] postgres v8béta3 on AIX5.2

2004-09-28 Thread Tom Lane
[EMAIL PROTECTED] writes: > I'm trying to install postgreSQL V8 béta3 on AIX5.2 and the horlogy > regression test fails: This is fairly hard to believe --- there shouldn't be any platform-specific variation in the horology test anymore, because we no longer rely on the C library for this functiona

[GENERAL] mssql linked server to postgres

2004-09-28 Thread Josh Close
What is the best "module" to use for mssql to set up a linked server with postgresql? -Josh ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Re: [GENERAL] Foreign key order evaluation

2004-09-28 Thread Gaetano Mendola
Michael Fuhr wrote: On Tue, Sep 28, 2004 at 01:30:08PM +, Randy Yates wrote: Randy Yates <[EMAIL PROTECTED]> writes: I'm confused. Where is the lock? Is it on the 1 record in the model table? Yes. If so, why is that record locked? Is it possible in Postgresql to update the primary key of a re

Re: [GENERAL] Custom Functions

2004-09-28 Thread Katsaros Kwn/nos
> So, does anyone know of (or have) good examples of queries within > functions (and returning sets of data)? I'm not very experienced in PostgreSQL but maybe SPI functions is what you need. Regards, Ntinos Katsaros ---(end of broadcast)--- TIP 5:

Re: [GENERAL] Foreign key order evaluation

2004-09-28 Thread Michael Fuhr
On Tue, Sep 28, 2004 at 01:30:08PM +, Randy Yates wrote: > Randy Yates <[EMAIL PROTECTED]> writes: > > > > I'm confused. Where is the lock? Is it on the 1 record in the model table? Yes. > > If so, why is that record locked? Is it possible in Postgresql to update > > the primary key of a reco

Re: [GENERAL] compiler for functions

2004-09-28 Thread Alvaro Herrera
On Tue, Sep 28, 2004 at 07:20:33AM -0700, Dennis Gearon wrote: > The postgres engine saves the function bodies, at least, without removing > the carriage returns. > > Could it be changed to report the LINE within the function body that has > the problem, based on the carriage return? This works

Re: [GENERAL] To OID or not to OID

2004-09-28 Thread Doug McNaught
"David Parker" <[EMAIL PROTECTED]> writes: > Is there any concrete reason NOT to create tables WITHOUT OIDS? We are > going to have some very large tables in our app, so saving the space and > not worrying about int-wrap seems like a good idea, but I'm worried that > I'm missing something. Nothin

[GENERAL] compiler for functions

2004-09-28 Thread Dennis Gearon
The postgres engine saves the function bodies, at least, without removing the carriage returns. Could it be changed to report the LINE within the function body that has the problem, based on the carriage return? I don't have an editor that counts characters within a document, but even if I did,

[GENERAL] To OID or not to OID

2004-09-28 Thread David Parker
I've been looking through the archives for guidance on whether or not we should create our tables WITHOUT OIDS. I've seen some discussions about making WITHOUT the default for user tables, and seen some caveats about the oid int value wrapping, etc., but I haven't been able to find a discussion of

[GENERAL] postgres v8béta3 on AIX5.2

2004-09-28 Thread frederic . germaneau
Hi I'm trying to install postgreSQL V8 béta3 on AIX5.2 and the horlogy regression test fails: $ more /postgres_util/postgresql-8.0.0beta3/src/test/regress/regression.diffs *** ./expected/horology.out Sat Jul 10 23:57:20 2004 --- ./results/horology.out Tue Sep 28 15:51:33 2004

Re: [GENERAL] Foreign key order evaluation

2004-09-28 Thread Randy Yates
Randy Yates <[EMAIL PROTECTED]> writes: > Mike, > > I'm confused. Where is the lock? Is it on the 1 record in the model table? > If so, why is that record locked? Is it possible in Postgresql to update > the primary key of a record? Let me also ask why this is a problem. It may be a lock situati

Re: [GENERAL] Foreign key order evaluation

2004-09-28 Thread Randy Yates
Mike, I'm confused. Where is the lock? Is it on the 1 record in the model table? If so, why is that record locked? Is it possible in Postgresql to update the primary key of a record? --RY [EMAIL PROTECTED] (Michael Fuhr) writes: > On Mon, Sep 27, 2004 at 03:19:47PM -0400, Shawn Chisholm wrote:

[GENERAL] Custom Functions

2004-09-28 Thread Matthew Metnetsky
I'm trying to write two custom recursive functions: one that selects, and the other that selects/updates. I've been looking around the internet for examples for they're so limiting and completely off track from what I need to do. The best examples I can find is in the source code for Postgres, bu

[GENERAL] FYRACLE better then PostgreSQL ?

2004-09-28 Thread Rodrigo Carvalhaes
Hi Guys! Someone already read this the documentation below? http://www.janus-software.com/fyracle.pdf They are saying that PostgreSQL is so robust as Firebird according to triggers ( I think that they are talking about their "universal triggers"), SQL functionality and transactions. wow! Someone

Re: [GENERAL] core dump on select

2004-09-28 Thread Martijn van Oosterhout
On Mon, Sep 27, 2004 at 04:18:41PM -0500, John Liu wrote: > Core dump on select from psql on AIX 5.x > > I have the following task at hand - > A huge table, one of the column data has duplicated entries. I want to find > those duplicated records in this column - > select count(*), col-x from tabl

Re: [GENERAL] Getting an out of memory failure.... (long email)

2004-09-28 Thread Sean Shanny
Tom, The Analyze did in fact fix the issue. Thanks. --sean On 9/27/04 11:54 PM, "Sean Shanny" <[EMAIL PROTECTED]> wrote: > Tom, > > We have been running pg_autovacuum on this entire DB so I did not even > consider that. I am running an analyze verbose now. > > We should see about 82mm rows