[GENERAL] stored procedures

2001-05-03 Thread Alexander Lohse
Hi, I am very new to PgSQL and I am just trying to figure out what for to use stored procedures. What I read/tested up to now is that pl/pgsql seems to be a bit clumsy to write. Possibly needing a lot of trial error. So, I am not really sure what is the benefit of writing logic inside the

[GENERAL] Views and Rules again

2001-05-03 Thread DaVinci
Hi. I have this rule for inserting in a view: -- te rule v_address_ins as on insert to v_address do instead (insert into address(calle,vía,localidad,provincia) values ( NEW.calle, get_vía(NEW.vía), get_localidad(NEW.localidad),

[GENERAL] Re: stored procedures

2001-05-03 Thread Mitch Vincent
So, I am not really sure what is the benefit of writing logic inside the DB. Is there a performance benefit compared to processing via PHP? One key benefit aside from anything else would be the ability to call the stored proceedure no matter how you were interfacing to the database. I've

[GENERAL] Multiple INSERT

2001-05-03 Thread Renaud Thonnart
Hello everyone! I have readen in the doc of PostgreSQL that we can insert several tuples in a table at one time. But it is said that the tuples to insert must be the result of a SELECT. Could someone explain me what is the advantage of that technique ? Because if I have to build a temporary

Re: [GENERAL] Multiple INSERT

2001-05-03 Thread Diana Cionoiu
Could someone explain me what is the advantage of that technique ? Because if I have to build a temporary table before being able to perform multiple INSERT, I work 2 times more, isn't it ? Or perhaps does it exist a way to perform multiple insert without build a temporary table; something

Re: [GENERAL] Multiple Inheritance

2001-05-03 Thread Oliver Elphick
[EMAIL PROTECTED] wrote: Hi everyone, I have found out that Postgres provides inheritance between tables. I wonder if 'multiple inheritance' can be implemented. I mean if a child table may have more than one parent table. And if this is possible what sql syntax does it

[GENERAL] Re: Ideal hardware configuration for pgsql

2001-05-03 Thread J.H.M. Dassen (Ray)
Bruce Momjian [EMAIL PROTECTED] wrote: Especially Linux's ext2 vs. BSD's UFS. Hmm.. Could you elaborate on that? Commonly perceived problems with ext2: - Lack of journalling This can be fixed by upgrading to ext3, or switching to ReiserFS, XFS or JFS (ReiserFS works well in

[GENERAL] Time to insert

2001-05-03 Thread Renaud Thonnart
Hi everyone Could someone explain me why time of insertion become that long when table increase ? For the same kind of insertion: When table is empty : 0.03s/row Table has 3663 rows : 2.07s/row Is that normal ? Sincerely, Renaud THONNART ---(end of

Re: [GENERAL] Time to insert

2001-05-03 Thread Renaud Thonnart
It is a little difficult to perform VACUUM analyse because I'm writing an application in C++ using libpq++. I Use version 7.0.3 I try COPY too but result was about the same. Renaud. Einar Karttunen wrote: On Thu, 3 May 2001, Renaud Thonnart wrote: Hi everyone Could someone explain me

Re: [GENERAL] Time to insert

2001-05-03 Thread Einar Karttunen
On Thu, 3 May 2001, Renaud Thonnart wrote: It is a little difficult to perform VACUUM analyse because I'm writing an application in C++ using libpq++. I Use version 7.0.3 I try COPY too but result was about the same. int PgConnection::ExecCommandOk(VACUUM ANALYZE); If you can upgrading to

Re: [GENERAL] Time to insert

2001-05-03 Thread Renaud Thonnart
Thank you Einar and Colin for your help. I have some little qusetions more : - How do I interpret a VACUUM ANALYSE ? - I'm going to load version 7.1 : what is the difference between 7.1 and 7.1rc4 ? Renaud THONNART Einar Karttunen wrote: On Thu, 3 May 2001, Renaud Thonnart wrote: It is

[GENERAL] troubles with postgresql 7.0.2

2001-05-03 Thread Diana Cionoiu
After working a while with postgresql 7.0.2 from redhat 7.0, with upgrates at glibc 2.2.2 and a few other improvements, i have kernel 2.2.17 from rh 7.0 updates. And today my postmaster died with : The Postmaster has informed me that some other backend died abnormally and possibly corrupted

Re: [GENERAL] troubles with postgresql 7.0.2

2001-05-03 Thread Diana Cionoiu
After working a while with postgresql 7.0.2 from redhat 7.0, with upgrates at glibc 2.2.2 and a few other improvements, i have kernel 2.2.17 from rh 7.0 updates. And today my postmaster died with : The Postmaster has informed me that some other backend died abnormally and possibly

Re: [GENERAL] Multiple Inheritance

2001-05-03 Thread Tom Lane
Oliver Elphick [EMAIL PROTECTED] writes: It's in the man page for create_table: inherited_table The optional INHERITS clause specifies a list of table names from which this table automatically inherits all fields. If any inherited

[GENERAL] column already exist (ERROR replaced by warning)

2001-05-03 Thread Olivier Chapiteau
In my script, i do an ALTER TABLE l_table ADD next_h varchar(64) not null; i get after the first execution ! column name next_h already exists in table l_table My problem is that the value returned by psql is 0, bu for me it's a warning, not an error.(i want to obtain a 1 in this case) Is it

Re: [GENERAL] troubles with postgresql 7.0.2

2001-05-03 Thread Tom Lane
Diana Cionoiu [EMAIL PROTECTED] writes: And today my postmaster died with : The Postmaster has informed me that some other backend died abnormally and possibly corrupted shared memory. I have rolled back the current transaction and am going to terminate your database system

[GENERAL] View Queries to server

2001-05-03 Thread Ryan Mahoney
Is it possible to view the last 100 queries issued to the database? -r --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.251 / Virus Database: 124 - Release Date: 4/26/01 ---(end of

Re: [GENERAL] ODBC 3.0 functions (UCASE, LCASE, etc.)

2001-05-03 Thread Peter Eisentraut
You might want to send this to -hackers and/or -odbc. Joel Burton writes: There are number of functions defined by ODBC 3 that we support, but not using the exact same name or order of arguments as ODBC 3.0. It's hard to tell how to proceed without a list of the proposed functions. --

[GENERAL] DBD::Pg errstr method doesn't return full error messages

2001-05-03 Thread Vivek Khera
Hi, I'm using DBD::Pg version 0.98 with Postgres 7.1. I'm noticing that quite often on an error, the $dbh-errstr method doesn't return the full error. For example, if I have a table with a unique key constraint: CREATE TABLE urls ( url_id SERIAL PRIMARY KEY, msg_id integer NOT NULL

RE: [GENERAL] Ideal hardware configuration for pgsql/Netra

2001-05-03 Thread Albertson, Chris
It's sitting right here on my desk. Ask whatever you want. Yes they are better web servers than DBMS servers but if you database is small enough to cache in RAM then who care if the Netra uses slow disks? All that talk on this list about Linux vs. BSD is silly. Why bother when you can have

Re: [GENERAL] ODBC 3.0 functions (UCASE, LCASE, etc.)

2001-05-03 Thread Bruce Momjian
OK, I am quoting at the top because I don't want to delete any of this. I think this is a great idea. In final form, it would be good to have a layer pre-parse the query string and rewrite Oracle-isms or MySQL-isms before they get to the parser, but as a first step, have a plug-in that would

[GENERAL] Re: Starting the Server at Boot

2001-05-03 Thread Joel Burton
On Thu, 3 May 2001, Peter Eisentraut wrote: Hunter Hillegas writes: Anyway, I want to start my Postgres server at boot (7.1). I tried the script that came with it and it doesn't work. It seems to start the server but it doesn't accept connections (yes, the -i option is on)... Is there a

RE: [GENERAL] Unique or Primary Key?

2001-05-03 Thread Christian Marschalek
Besides, I couldn't see much use in creating it as a primary key. How would I ever reference it from another table? What does this have to do with beeing a primary key? Well you reference to primary keys as you do with others?!? When you have for example user ids you shouldn't have a

Re: [GENERAL] View permissions in 7.1

2001-05-03 Thread Tom Lane
Lieven Van Acker [EMAIL PROTECTED] writes: I guess I was a bit to optimistic about the patch. It seems like the select permissions are solved, but update (inc. insert / delete) operations still fail with permission denied on the nested views. That's no help; I need an example.

[GENERAL] mysql to Pgsql

2001-05-03 Thread Martín Marqués
I think I heard about a script that would convert mysql dump files to Pgsql dumps. Can someone remind me where they are? Saludos... :-) -- El mejor sistema operativo es aquel que te da de comer. Cuida tu dieta. - Martin Marques

Re: [GENERAL] Installing in SuSE 7.1

2001-05-03 Thread Martín Marqués
On Jue 03 May 2001 22:51, Trond Eivind Glomsrød wrote: Bill Barnes [EMAIL PROTECTED] writes: Does anyone know of a package for 7.0.3 or 7.1 that will install in SuSE's latest release. How about the Red Hat 7.1 RPMS? Try? They require glibc 2.2, but AFAIK the newest SuSE release has

Re: [GENERAL] DBD::Pg errstr method doesn't return full error messages

2001-05-03 Thread Michelle Murrain
On Thursday 03 May 2001 03:24 pm, Vivek Khera wrote: where $msgid and $url are the same values above, I get this output: ERROR: Cannot i This makes it a bit difficult to distinguish between a hard error and simply a duplicate insert error, which I can handle in this app. Also, at other

Re: [GENERAL] Installing in SuSE 7.1

2001-05-03 Thread Trond Eivind Glomsrød
Martín Marqués [EMAIL PROTECTED] writes: On Jue 03 May 2001 22:51, Trond Eivind Glomsrød wrote: Bill Barnes [EMAIL PROTECTED] writes: Does anyone know of a package for 7.0.3 or 7.1 that will install in SuSE's latest release. How about the Red Hat 7.1 RPMS? Try? They require

Re: [GENERAL] mysql to Pgsql

2001-05-03 Thread Bruce Momjian
[ Charset ISO-8859-1 unsupported, converting... ] I think I heard about a script that would convert mysql dump files to Pgsql dumps. Can someone remind me where they are? Saludos... :-) In 7.1 /contrib. -- Bruce Momjian| http://candle.pha.pa.us [EMAIL

RE: [GENERAL] MS-Query

2001-05-03 Thread Mike Mascari
Can you access other data sources via MS-Query, such as local Access databases, or possibly remote MSSQL server databases? I can't think of any reason why MS-Query should be crashing... Mike Mascari [EMAIL PROTECTED] -Original Message- From: Ludwig Meyerhoff [SMTP:[EMAIL PROTECTED]]

[GENERAL] cast bit to boolean?

2001-05-03 Thread Vivek Khera
How might one case a BIT to a BOOLEAN? For example, I want to return rows which have non-zero bit representation for, say, (sel_a b'0011'). That is, rows with the first or second bit set. I tried an explicit CAST, and just the query directly, but the cast say you cant cast type 'bit' to

[GENERAL] RE: Unique or Primary Key?

2001-05-03 Thread Joel Burton
Besides, I couldn't see much use in creating it as a primary key. How would I ever reference it from another table? If you're questioning how to use a multi-field primary key, it's easy... create table p (id1 int not null, id2 int not null, primary key(id1, id2)); create table c (id1

[GENERAL] Re: Ideal hardware - OS Wars are silly.

2001-05-03 Thread Mitch Vincent
Uhh.. OS wars are silly. Use what ever OS you like. We should discuss PostgreSQL here, not operating systems (at least not in the classic flame-war style).. *sigh* -Mitch ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to

[GENERAL] Invoices

2001-05-03 Thread Ludwig Meyerhoff
Hallo! Maybe this is a bit off-topic, as this problem is more a design-one, but I wanted to write a web-application write invoices more easy. I wonder if it was a good idea to try this using Postgres or if it was better to write the data of each invoice in a separate file in a separate

Re: [GENERAL] Ideal hardware configuration for pgsql

2001-05-03 Thread Trond Eivind Glomsrød
Michelle Murrain [EMAIL PROTECTED] writes: On Thursday 03 May 2001 11:58 am, Trond Eivind Glomsrød wrote: GH [EMAIL PROTECTED] writes: On Wed, May 02, 2001 at 08:07:04PM +0100, some SMTP stream spewed forth: I only have experience with Red Hat, Solaris 8 (intel), and LinuxPPC.

Re: [GENERAL] Ideal hardware configuration for pgsql/Netra

2001-05-03 Thread GH
On Thu, May 03, 2001 at 12:52:24PM -0700, some SMTP stream spewed forth: It's sitting right here on my desk. Ask whatever you want. Yes they are better web servers than DBMS servers but if you database is small enough to cache in RAM then who care if the Netra uses slow disks? All

Re: [GENERAL] View permissions in 7.1

2001-05-03 Thread Tom Lane
Lieven Van Acker [EMAIL PROTECTED] writes: I guess I was a bit to optimistic about the patch. It seems like the select permissions are solved, but update (inc. insert / delete) operations still fail with permission denied on the nested views. Okay, the example you sent me off-list turns out

[GENERAL] Re: mysql to Pgsql

2001-05-03 Thread Joel Burton
On Thu, 3 May 2001, Bruce Momjian wrote: [ Charset ISO-8859-1 unsupported, converting... ] I think I heard about a script that would convert mysql dump files to Pgsql dumps. Can someone remind me where they are? Saludos... :-) In 7.1 /contrib. And more info about it at

Re: [GENERAL] View permissions in 7.1

2001-05-03 Thread Tom Lane
Lieven Van Acker [EMAIL PROTECTED] writes: do I have to restore the original rewriteHandler.c? (before the first patch) No, that patch is correct as far as it goes, and indeed necessary for the second patch. regards, tom lane ---(end of

Re: [GENERAL] View permissions in 7.1

2001-05-03 Thread Lieven Van Acker
Okay, the example you sent me off-list turns out to exhibit one bug and one not-yet-implemented feature. There is a bug in permissions checking for insert/update/delete rules (any references therein to NEW or OLD should be checked against the rule owner, not the calling user). A patch for

[GENERAL] Re: cast bit to boolean?

2001-05-03 Thread Joel Burton
On Thu, 3 May 2001, Vivek Khera wrote: How might one case a BIT to a BOOLEAN? For example, I want to return rows which have non-zero bit representation for, say, (sel_a b'0011'). That is, rows with the first or second bit set. I tried an explicit CAST, and just the query directly, but

Re: [GENERAL] Ideal hardware configuration for pgsql/Netra

2001-05-03 Thread Trond Eivind Glomsrød
GH [EMAIL PROTECTED] writes: Somebody claimed that my post was uninformed...yet RedHat is all of Linux now? No, of course not. Red Hat is more than Linux, Linux is more than our version of it: Red Hat Linux. -- Trond Eivind Glomsrød Red Hat, Inc. ---(end of

Re: [GENERAL] cast bit to boolean?

2001-05-03 Thread Robert Hentosh
On Thu, May 03, 2001 at 05:25:14PM -0400, Vivek Khera wrote: How might one case a BIT to a BOOLEAN? For example, I want to return rows which have non-zero bit representation for, say, (sel_a b'0011'). That is, rows with the first or second bit set. I tried an explicit CAST, and just the

Re: [GENERAL] View permissions in 7.1

2001-05-03 Thread Lieven Van Acker
Tom, do I have to restore the original rewriteHandler.c? (before the first patch) Lieven ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [GENERAL] RE: Security and performance

2001-05-03 Thread pgsql
On Wed, May 02, 2001 at 05:50:49PM -0700, [EMAIL PROTECTED] wrote: Instead of making a kajillion views I limit what others can see using php scripting: Wrong approach for me. I am not writing the php scripts and I don't want to trust those who are. Even if I were writing the scripts, I

Re: [GENERAL] View permissions in 7.1

2001-05-03 Thread Tom Lane
Lieven Van Acker [EMAIL PROTECTED] writes: Well, in fact, -at this point - I don't need setuid, because the function current_adm() has to lookup the effective uid of the calling user. The point is I want to filter the records depending on the uid of the user calling the top-level view. So as

Re: [GENERAL] Ideal hardware configuration for pgsql

2001-05-03 Thread Michelle Murrain
On Thursday 03 May 2001 04:48 pm, Trond Eivind Glomsrød wrote: Those others, like stable and secure. Enjoyable is obviously subjective (FreeBSD isn't very enjoyable for me, who has used Linux and Solaris extensively and much prefer SysV to BSD). OK, I'll buy that the post was a bit much - my

Re: [GENERAL] View permissions in 7.1

2001-05-03 Thread Lieven Van Acker
Tom Lane wrote: Lieven Van Acker [EMAIL PROTECTED] writes: Well, in fact, -at this point - I don't need setuid, because the function current_adm() has to lookup the effective uid of the calling user. The point is I want to filter the records depending on the uid of the user calling

Re: [GENERAL] Ideal hardware configuration for pgsql/Netra

2001-05-03 Thread Steve Wolfe
Yes they are better web servers than DBMS servers but if you database is small enough to cache in RAM then who care if the Netra uses slow disks? All that talk on this list about Linux vs. BSD is silly. Why bother when you can have Solaris 8 on SPARC hardware? Easy: Cost. (And,

[GENERAL] Re: Ideal hardware configuration for pgsql

2001-05-03 Thread Lincoln Yeoh
At 03:11 PM 03-05-2001 -0600, Steve Wolfe wrote: Since I'd rather have a screwdriver than a compiler, I'll jump in on a response to the original message Great at least a relevant response ;). Once you've got a gig of RAM and you're using SCSI disks (preferably RAID), the CPU's tend