Re: [GENERAL] char o varchar

2003-09-17 Thread Andreas Fromm
As of my knowlege, varchar as the choice when you have varying lenght strings, because only the real string lenght is stored in the db, while char is usefull when most of your records ar exactly the stringlenght defined by the column, because no overhead is to be kept for storing the actual str

Re: [GENERAL] State of Beta 2

2003-09-17 Thread Mark Cave-Ayland
> Date: Tue, 16 Sep 2003 14:39:47 -0700 > From: "Joshua D. Drake" <[EMAIL PROTECTED]> > To: Andrew Rawnsley <[EMAIL PROTECTED]> > Cc: "Marc G. Fournier" <[EMAIL PROTECTED]>, > PgSQL General ML <[EMAIL PROTECTED]> > Subject: Re: State of Beta 2 > Message-ID: <[EMAIL PROTECTED]> > > > > > Tying

Re: [GENERAL] Graphical Mapping a Database

2003-09-17 Thread Christopher Murtagh
On Fri, 2003-08-15 at 00:17, David Fetter wrote: > "Tim Edwards" <[EMAIL PROTECTED]> wrote: > > Does anyone have a utility to map out database structures and put it > > in a printable format ? PDF, GIF, JPG, etc. > > Try DBVisualizer at . FWIW, we bought a site license for D

Re: [GENERAL] CONCAT function

2003-09-17 Thread Dennis Gearon
You're not from Texas, are you? :-) Christopher Browne wrote: In an attempt to throw the authorities off his trail, [EMAIL PROTECTED] ("scott.marlowe") transmitted: Given the third choice, I'd throw the switch. Why is it that I think of something _completely_ different when you use the ph

Re: [GENERAL] Database Recovery Procedures

2003-09-17 Thread Tom Lane
Network Administrator <[EMAIL PROTECTED]> writes: > ..if I using the psql client, and issue a "select * from > limit 5" if get this... > PANIC: read of clog file 5, offset 16384 failed: Success Hm, not good :-(. What files actually exist in $PGDATA/pg_clog/ (names and sizes)? > So back to my

PHP db support was Re: [GENERAL] Dreamweaver

2003-09-17 Thread Christopher Murtagh
On Sat, 2003-08-16 at 12:34, Ken Harris wrote: > The closet thing PHP has is PEAR - it has the Dataobject concept and is as > close to "neutral" as PHP gets. A long time ago, I wrote a "DB Neutral set of > routines which works with Oracle, Postgresql and, untested, MySQL. That just > seemed to

Re: [GENERAL] Trying to create a GiST index in 7.3

2003-09-17 Thread Oleg Bartunov
Hi there, I'm back from vacation and clearing my mbox. I intended to write documentation about GiST, but other things grab attention :) There is quite short intro in Russian http://www.sai.msu.su/~megera/postgres/gist/doc/gist-inteface-r.shtml and a bunch of GiST modules http://www.sai.msu.su/~me

Re: [GENERAL] Trying to create a GiST index in 7.3

2003-09-17 Thread Tom Lane
Christopher Murtagh <[EMAIL PROTECTED]> writes: > On Fri, 2003-08-08 at 16:08, Tom Lane wrote: >> You should not be using the 7.2 methods anymore --- there is a CREATE >> OPERATOR CLASS, use that instead. (See the contrib gist classes for >> examples.) > I'm having the same problem as Dmitry, bu

Re: [GENERAL] State of Beta 2

2003-09-17 Thread Joshua D. Drake
I have no doubt that a competent programmer could learn the Postgres innards well enough to do the job; as someone pointed out earlier in this thread, none of the core committee was born knowing Postgres. I do, however, doubt that it can be done in six months if one has any significant learning cu

[GENERAL] psql and blob

2003-09-17 Thread Daniel Schuchardt
Hi @ all, i'm sure there was a psql-function to transfere my Blob-Data to the server but I can't remember. I have a script like this : UPDATE xy SET z = lo_import('localpath_and_file'); but i want to execute this script from the client and so my blob-data is on the client and lo_import fails (t

Re: [GENERAL] Database Recovery Procedures

2003-09-17 Thread Network Administrator
Quoting Tom Lane <[EMAIL PROTECTED]>: > Network Administrator <[EMAIL PROTECTED]> writes: > > ..if I using the psql client, and issue a "select * from name> > > limit 5" if get this... > > > PANIC: read of clog file 5, offset 16384 failed: Success > > Hm, not good :-(. What files actually exi

[GENERAL] converting PostgreSQ- timestamp to UNIX-timestamp ?

2003-09-17 Thread Cornelia Boenigk
Hi everybody To convert PostgreSQL timestmp to UNIX timestamp I use select ((today::abstime)::int4) from table ... In the documentation there is a notice that abstime shouldn't be used. Is there another way to convert? Also I tried select timetz_hash(today) from table .. and got negative valu

Re: [GENERAL] Database Recovery Procedures

2003-09-17 Thread Tom Lane
Network Administrator <[EMAIL PROTECTED]> writes: >>> PANIC: read of clog file 5, offset 16384 failed: Success >> Hm, not good :-(. What files actually exist in $PGDATA/pg_clog/ (names >> and sizes)? > -rw---1 postgres users 262144 Jul 20 15:53 > -rw---1 postgres users

[GENERAL] Why does adding SUM and GROUP BY destroy performance?

2003-09-17 Thread David Link
Hi, Why does adding SUM and GROUP BY destroy performance? details follow. Thanks, David Link s1.sql: SELECT t.tid, t.title, COALESCE(s0c100r100.units, 0) as w0c100r100units, (COALESCE(r1c2r100.units, 0) + COALESCE(y0c2r100.units, 0)) as r0c2r100units F

[GENERAL] Weird query plan

2003-09-17 Thread Dmitry Tkach
Hi, everybody! Here is a weird problem, I ran into... I have two huge (80 million rows each) tables (a and b), with id as a PK on both of them and also an FK from b referencing a. When I try to run a query like: select * from a, b where a.id >= 7901288 and a.id=b.id limit 1; The query takes *f

Re: [GENERAL] psql and blob

2003-09-17 Thread Darko Prenosil
On Wednesday 17 September 2003 18:32, Daniel Schuchardt wrote: > Hi @ all, > > i'm sure there was a psql-function to transfere my Blob-Data to the > server but I can't remember. > > I have a script like this : > > UPDATE xy SET z = lo_import('localpath_and_file'); > > but i want to execute this scr

[GENERAL] Bug while installing in AIX 5.1

2003-09-17 Thread jason dang
I found a bug on the psqlODBC version 07.03.0100 installation package in the header file: statement.h, line 117 and 125 contain an extra ','. Linux will ignore this but this will give error if it's installed on a AIX machine. Regards, ---(end of broadcast)--

Re: [GENERAL] converting PostgreSQ- timestamp to UNIX-timestamp ?

2003-09-17 Thread Tom Lane
"Cornelia Boenigk" <[EMAIL PROTECTED]> writes: > To convert PostgreSQL timestmp to UNIX timestamp I use > select ((today::abstime)::int4) from table ... > In the documentation there is a notice that abstime shouldn't be used. > Is there another way to convert? "SELECT EXTRACT(EPOCH FROM timestamp)

Re: [GENERAL] psql and blob

2003-09-17 Thread Daniel Schuchardt
Hm, but lo_import/lo_export imports/exports from the local filesystem. I want to upload/download a clientfile to/from the Server Database with psql. I think this is a feature in psql. But i can't remember... Daniel -Ursprüngliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECT

Re: [GENERAL] Weird query plan

2003-09-17 Thread Tom Lane
Dmitry Tkach <[EMAIL PROTECTED]> writes: > The query plan looks identical in both cases: > Limit (cost=0.00..12.51 rows=1 width=8) > -> Nested Loop (cost=0.00..1009772807.91 rows=80740598 width=8) > -> Index Scan using b_pkey on b (cost=0.00..375410773.29 > rows=80740598 width=4) >

Re: [GENERAL] Database Recovery Procedures

2003-09-17 Thread Network Administrator
Quoting Tom Lane <[EMAIL PROTECTED]>: > Network Administrator <[EMAIL PROTECTED]> writes: > >>> PANIC: read of clog file 5, offset 16384 failed: Success > > >> Hm, not good :-(. What files actually exist in $PGDATA/pg_clog/ (names > >> and sizes)? > > > -rw---1 postgres users 2621

Re: [GENERAL] Weird query plan

2003-09-17 Thread Dmitry Tkach
Hmmm... Indeed. I tried it in 7.2.4 on a couple of empty tables, and it does do the right thing... Also, I have another copy (not exact copy, but identical schema, and similar content... but about twice smaller) of the original database... I tried my query on it, and it works right too. So, ther

Re: [GENERAL] Visual database structure browser for postgresql?

2003-09-17 Thread Vaclav Frolik
Hello Bart, please feel free to try our CASE Studio 2 http://www.casestudio.com this database design tool allows you to reverse engineer already existing database structures and display all the tables, relationships etc. Of course, you can generate SQL scripts and/or very detailed HTML/RTF repo

Re: [GENERAL] State of Beta 2

2003-09-17 Thread Dennis Gearon
I had already committed $50/mo. Robert Creager wrote: Once upon a time (Tue, 16 Sep 2003 21:26:05 -0700) Dennis Gearon <[EMAIL PROTECTED]> uttered something amazingly similar to: Robert Creager wrote: Once upon a time (Tue, 16 Sep 2003 12:59:37 -0700) "Joshua D. Drake" <[EMAIL PROTECTED]

Re: [GENERAL] Weird query plan

2003-09-17 Thread Tom Lane
Dmitry Tkach <[EMAIL PROTECTED]> writes: > Also, I have another copy (not exact copy, but identical schema, and > similar content... but about twice smaller) of the original database... > I tried my query on it, and it works right too. > So, there must be something wrong with that particular dat

Re: [GENERAL] psql and blob

2003-09-17 Thread CoL
Hi, if you, then write a program for that. psql is a database server, not a client program. C. Daniel Schuchardt wrote, On 9/17/2003 8:37 PM: Hm, but lo_import/lo_export imports/exports from the local filesystem. I want to upload/download a clientfile to/from the Server Database with psql. I t

[GENERAL] Where are PL/pgSQL functions stored?

2003-09-17 Thread David Shadovitz
Where are PL/pgSQL functions stored? I want to retrieve the text of a function that I've created. Thanks. -David ---(end of broadcast)--- TIP 8: explain analyze is your friend

[GENERAL] Job opportunity for PostgreSQL developer

2003-09-17 Thread Kyle
We may be hiring a developer in the next few months to work our our current ERP which is implemented in TCL/TK and PostgreSQL. Anyone interested could send a resume to me. You might also look at an older iteration of part of our work at www.wyatterp.com. Kyle Bateman President, Action Target

[GENERAL] psql and blob

2003-09-17 Thread Daniel Schuchardt
Hi @ all, i'm sure there was a psql-function to transfere my Blob-Data to the server but I can't remember. I have a script like this : UPDATE xy SET z = lo_import('localpath_and_file'); but i want to execute this script from the client and so my blob-data is on the client and lo_import fails (t

Re: [GENERAL] psql and blob

2003-09-17 Thread Nigel J. Andrews
On Wed, 17 Sep 2003, Daniel Schuchardt wrote: > Hm, but lo_import/lo_export imports/exports from the local filesystem. > I want to upload/download a clientfile to/from the Server Database with > psql. I think this is a feature in psql. But i can't remember... Yes it is. You want to look up \lo_

[GENERAL] State of Beta (2)

2003-09-17 Thread Joshua D. Drake
Hello, O.k. here are my thoughts on how this could work: Command Prompt will set up an escrow account online at www.escrow.com. When the Escrow account totals 2000.00 and is released, Command Prompt will dedicate a programmer for one month to debugging, documenting, reviewing, digging, cryi

Re: [GENERAL] Weird query plan

2003-09-17 Thread Dmitry Tkach
Tom Lane wrote: Dmitry Tkach <[EMAIL PROTECTED]> writes: Also, I have another copy (not exact copy, but identical schema, and similar content... but about twice smaller) of the original database... I tried my query on it, and it works right too. So, there must be something wrong with

Re: [GENERAL] psql and blob

2003-09-17 Thread Jonathan Bartlett
> if you, then write a program for that. psql is a database server, not a > client program. No, psql is a client program. postmaster is the database server. Jon > > C. > > Daniel Schuchardt wrote, On 9/17/2003 8:37 PM: > > Hm, but lo_import/lo_export imports/exports from the local filesystem.

Re: [GENERAL] Weird query plan

2003-09-17 Thread Dmitry Tkach
P.S. I also tried to look at the stats of that other database I mentioned... The stats for b look similar: stavalues1 | {1028104,25100079,50685614,78032989,105221902,135832793,199827486,611968165,807597786,884897604,969971779} But the stats for a are just *not there at all* (is it even possibl