Re: [GENERAL] sequences in schemas

2004-08-31 Thread Pierre-Frédéric Caillaud
You forgot the ";" CREATE SCHEMA joe; CREATE SEQUENCE joe.joe_seq start 1; CREATE TABLE joe.joe_table (int id, varchar name); ---(end of broadcast)--- TIP 6: Have you searched our list archives? http://archives.postgresql.org

Re: [GENERAL] Performance on 7.4 vs 7.2?

2004-08-31 Thread Gaetano Mendola
Pablo S wrote: Hi there Pg admins, I have 2 systems, one OLD, (linux 2.4 running postgresql-7.2.1-5 with a perl web db on Apache/1.3.23 mod_perl 1.26 and dbi 1.37 with peristent db connections via apache:dbi. ) The other system is NEW (running the same web app on linux 2.6 postgresql-7.4.2-1 w/ Ap

Re: [GENERAL] Overloading '<' operator

2004-08-31 Thread Suresh Tri
I used the internal function text_pattern_lt and it is working fine! Thanks for helping. cheers Suresh ---(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] Error Message Importing Into PostgreSQL (Using phpPgAdmin)

2004-08-31 Thread Russell Smith
On Wed, 1 Sep 2004 12:53 pm, Daniel Secomb wrote: > Hi, > > I'm using PostgreSQL 7.3.4 with phpPgAdmin 2.4.2 and the ".sql" file I'm > trying to import came from a dump from a server running PostgreSQL 7.0.3. > I'd suggest a phpPgAdmin upgrade 3.4 is the latest. > I just got this error message t

Re: [GENERAL] Not able to build libpq for Windows

2004-08-31 Thread Vidyasagara Guntaka
Hi Bruce, I'm still getting some compilation errors. I'm listing the steps I followed below: 1. Downloaded the postgresql-8.0.0beta2 file 2. Unzipped it. 3. Change directory to src directory and issued "nmake /f win32.mak" command. I see many undelcared identifiers in port/path.c file. Looks lik

Re: [GENERAL] Suppress output from psql?

2004-08-31 Thread Alvaro Herrera
On Tue, Aug 31, 2004 at 09:00:24PM -0400, Doug McNaught wrote: > Ron St-Pierre <[EMAIL PROTECTED]> writes: > > > Is there a way 'within' psql to suppress output? > > > > One of our cron scripts calls a sql file which contains various database > > commands (ALTER TABLEs, UPDATEs, etc) and various u

Re: [GENERAL] Suppress output from psql?

2004-08-31 Thread Scott Gerhardt
You could redirect the output from your cron initiated script with: > /dev/null 2>&1 Is there a way 'within' psql to suppress output? One of our cron scripts calls a sql file which contains various database commands (ALTER TABLEs, UPDATEs, etc) and various user-defined functions. So within this

Re: [GENERAL] Large Databases

2004-08-31 Thread Cott Lang
On Tue, 2004-08-31 at 20:37, Joe Conway wrote: > > > However, my results changed drastically under the 2.6 kernel, when the > > NFS results stayed about the same as 2.4, but the SAN jumped about 50% > > in transactions per second. > > Very interesting. Whose SAN are you using that supports the 2.

Re: [GENERAL] Large Databases

2004-08-31 Thread Joe Conway
Cott Lang wrote: My best NFS results were within about 15% of the speed of my best SAN results. Good info, and consistent with what I've seen. However, my results changed drastically under the 2.6 kernel, when the NFS results stayed about the same as 2.4, but the SAN jumped about 50% in transaction

Re: [GENERAL] Suppress output from psql?

2004-08-31 Thread Tom Lane
Ron St-Pierre <[EMAIL PROTECTED]> writes: > Is there a way 'within' psql to suppress output? Perhaps "\o /dev/null" ? regards, tom lane ---(end of broadcast)--- TIP 6: Have you searched our list archives? htt

[GENERAL] Python Postgresql support?

2004-08-31 Thread Jerry LeVan
Is it possible to build the python postgresql support library on Mac OSX 10.3.5 with the default python install? Adding "--with-python" gets an error message about libpython not being a shared library when attempting to build postgresql. (pg 7.4.5) Thanks for any pointers. Jerry ---

Re: [GENERAL] Large Databases

2004-08-31 Thread Cott Lang
On Tue, 2004-08-31 at 15:07, Joe Conway wrote: > I suppose there *may* be some fundamental technical difference that > makes Postgres less reliable than Oracle when using NFS, but I'm not > sure what it would be -- if anyone knows of one, please speak up ;-). > Early testing on NFS mounted NAS

[GENERAL] Error Message Importing Into PostgreSQL (Using phpPgAdmin)

2004-08-31 Thread Daniel Secomb
Hi,   I'm using PostgreSQL 7.3.4 with phpPgAdmin 2.4.2 and the ".sql" file I'm trying to import came from a dump from a server running PostgreSQL 7.0.3.   I just got this error message trying to import the PostgreSQL database file into phpPgAdmin. The error message was as follows:   Error -

Re: [GENERAL] Representating a family tree

2004-08-31 Thread Joel
On Sun, 29 Aug 2004 Guy Naor wrote > Hi, > > Are there any built in or known structures I can use in Postgres to represent a > family tree? I'll go out on a limb here. Not really, but, ... > The usual tree representations in SQL are for regular hierarchy of > data, but on a family each node h

Re: [GENERAL] Single Row Table?

2004-08-31 Thread Thomas Kellerer
Mike Nolan wrote on 31.08.2004 21:46: But should you also prevent DELETE's from that table? Otherwise you could wind up with no rows at all. I guess that would have to be done using a rule... Why not just revoke the delete privilege? That was one of my first guesses as well, but then I'm not sur

Re: [GENERAL] Change config of running PGSQL

2004-08-31 Thread Doug McNaught
"McDougall, Marshall (FSH)" <[EMAIL PROTECTED]> writes: > I made sure that readline was indeed installed to no avail. The configure > still does not see the libs. Any ideas? You don't say what system you're on, but most Linux distributions split library packages like readline into 'runtime' and

Re: [GENERAL] Change config of running PGSQL

2004-08-31 Thread McDougall, Marshall (FSH)
Thanks for the response Doug. I started down the path that you suggested and quickly found out why it was compiled that way. When the configure script gets to checking readline libraries, it says it can't find them and stops there ala: checking for main in -lresolv... yes checking for library c

[GENERAL] Large Databases

2004-08-31 Thread elein
What is the linux and/or postgres limitation for very large databases, if any? We are looking at 6T-20T. My understanding is that if the hardware supports it, then it can be done in postgres. But can hardware support that? --elein [EM

Re: [GENERAL] About "lock file postmaster.pid" Error , cannot setup

2004-08-31 Thread Ying Lu
Thank you gnari, I deleted the postmaster.pid and /tmp/.s.PGSQL.5432.lock files; now it works :) gnari wrote: From: "Ying Lu" <[EMAIL PROTECTED]> The situation I met is that I was running postmaster, but because of the server closed all my konsole. As a result, I did not shutdown postmaster su

Re: [GENERAL] About "lock file postmaster.pid" Error , cannot setup postmaster

2004-08-31 Thread gnari
From: "Ying Lu" <[EMAIL PROTECTED]> > The situation I met is that I was running postmaster, but because of the > server closed all my konsole. As a result, I did not shutdown postmaster > successfully. Next time, when I tried to run > postmaster -D /usr/local/postgresql/data, I got the following er

Re: [GENERAL] Substring result short by 1

2004-08-31 Thread gnari
From: "David Filion" <[EMAIL PROTECTED]> > > prepaid=# select substring('15148300', 0, 5); try substring('15148300', 1, 5); gnari ---(end of broadcast)--- TIP 8: explain analyze is your friend

[GENERAL] zombie primary key lurches out of database to devour the brains of the unwary

2004-08-31 Thread Kevin Murphy
Using PG 7.4.5 on Mac OS X 10.3 ... I have a primary key that I can't destroy and can't create. One weird symptom is that when I use \d in psql to attempt to display the constraint, there is no output at all! Normally, psql either shows the constraint or reports that the constraint doesn't exi

Re: [GENERAL] Single Row Table?

2004-08-31 Thread Mike Nolan
> But should you also prevent DELETE's from that table? Otherwise you could > wind up with no rows at all. I guess that would have to be done using a rule... Why not just revoke the delete privilege? -- Mike Nolan ---(end of broadcast)--- TIP 1: su

[GENERAL] About "lock file postmaster.pid" Error , cannot setup postmaster

2004-08-31 Thread Ying Lu
Hello all, I met a problem about cannot start postmaster. The situation I met is that I was running postmaster, but because of the server closed all my konsole. As a result, I did not shutdown postmaster successfully. Next time, when I tried to run postmaster -D /usr/local/postgresql/data, I got

[GENERAL] Substring result short by 1

2004-08-31 Thread David Filion
Hi, I have a question about substring(), when I run the following query: prepaid=# select substring('15148300', 0, 5); substring --- 1514 (1 row) I get a result with only the first 4 characters, not five. Why is that? The documentation doesn't spend much time discussing the substring()

Re: [GENERAL] Types and SRF's

2004-08-31 Thread Jerry LeVan
Doh, I was using \dT and \dT+ Thanks Jerry On Aug 31, 2004, at 3:14 PM, Tom Lane wrote: Jerry LeVan <[EMAIL PROTECTED]> writes: I would feel a bit more comfortable if I could recover the definition of the type at a later time, Try "\d annual_report_type" in psql. regards

Re: [GENERAL] Types and SRF's

2004-08-31 Thread Tom Lane
Jerry LeVan <[EMAIL PROTECTED]> writes: > I would feel a bit more comfortable if I could recover the definition > of the type at a later time, Try "\d annual_report_type" in psql. regards, tom lane ---(end of broadcast)--- T

Re: [GENERAL] Single Row Table?

2004-08-31 Thread Thomas Kellerer
Tim Penhey wrote on 30.08.2004 23:12: I have got a table which is supposed to contain only one row. It does not have any primary keys defined. So, essentially, when a new insert happens in that table, I would like it (the insert) to fail if there is already a row existing in that table. You co

Re: [GENERAL] Not able to build libpq for Windows

2004-08-31 Thread Bruce Momjian
We fixed a number of MS VC issues and these should be in the beta2 release and in CVS. --- Vidyasagara Guntaka wrote: > Hi, > > I am not able to build the libpq for windows using the 8.0 beta1 version source > code. I pos

Re: [GENERAL] Forcing a stored procedure recompile

2004-08-31 Thread Gaetano Mendola
Mike McGavin wrote: Hello everyone. Can anyone suggest if there's a way to force a plpgsql stored procedure to be recompiled every time that it's called, based on the values of the parameters that it's given? I assumed it would be possible, but unfortunately haven't been able to find any docume

[GENERAL] Types and SRF's

2004-08-31 Thread Jerry LeVan
Hi, I am trying to get my feet wet in SRF's I had to define a type in order to get my first attempt at a srf for an sql language function ie.. create type annual_report_type as ( category text, jan numeric(9,2), feb numeric(9,2), mar numeric(9,2), apr numeric(9,2), may numeric(9,2), jun numer

[GENERAL] Not able to build libpq for Windows

2004-08-31 Thread Vidyasagara Guntaka
Hi, I am not able to build the libpq for windows using the 8.0 beta1 version source code. I posted this message for couple of time by now. I did not get any responses. Is this supposed to be broken at this point ? Can you somebody please respond for this issue? Thank you very much in advanc

Re: [GENERAL] cannot reach http:/archives.postgresql.org

2004-08-31 Thread Ron St-Pierre
You can also try pgsql.ru Ron ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html

Re: [GENERAL] Conditional foreign key?

2004-08-31 Thread Gaetano Mendola
Benjamin Smith wrote: We have a list of customers, some of whom have purchased feature X and some of whom have not. If a customer has paid for featurex, they can use it, and a strict relationship between cust_items.items_id and items.id, but only if they are signed up to use featurex, otherwise

Re: [GENERAL] Microsoft Project and PostgreSQL?

2004-08-31 Thread Daniel Schuchardt
Klaus Harbo schrieb: according to the manual. A simple test with PostgreSQL results in an error something like 'Unknown data type "lo"'. It seems that you try to access binary data fields. In postgresql the type lo (BLOB) is implemented as oid or bytea. Read in the archives. Try CREATE DOMAIN

Re: [GENERAL] cannot reach http:/archives.postgresql.org

2004-08-31 Thread Jeff
On Aug 31, 2004, at 10:19 AM, David Parker wrote: I have also been unable to reach archives. The archives have been down for days. It is quite unfortunate. I'd suggest using google's cache feature until the problems can be resolved. I am however getting list mail... -- Jeff Trout <[EMAIL PROTECTE

[GENERAL] Multicolumn Primary Key

2004-08-31 Thread Thomas F . O'Connell
We've got a table that has a definition as follows: CREATE TABLE linking_table ( fk int8 REFERENCES source_table( pk1 ), value int8, PRIMARY KEY( fk1, value ) ); I would've thought that the multicolumn primary key would behave as a multicolumn index is supposed to behave per http://www.postgres

Re: [GENERAL] Hebrew support -- please help !

2004-08-31 Thread John Sidney-Woollett
> Now I got the right information from the DB in Hebrew and french. > Still can't save value in Hebrew from client (browser) to server and > in french if I save 'été' in a column varchar(3) I got a range over > exception. > > What happen here ! something else to config ? This is a Tomcat question..

Re: [GENERAL] Hebrew support -- please help !

2004-08-31 Thread Elie Nacache
Hi Guy,   > Are you sure your client side display and fonts are set correctly?   Yes, I can display Hebrew font.   > Can you look at the ASCII codes you get back from Postgres to make sure they are not the correct Hebrew characters.   I use pgAdmin3 on W2K to insert row in Hebrew and can see the r

Re: [GENERAL] Single Row Table?

2004-08-31 Thread Mike Nolan
> ISTM most natural to do this with a rule, e.g.: > > CREATE RULE my_insert_rule AS ON INSERT TO my_table DO > INSTEAD NOTHING; > > Which will cause all inserts to be silently dropped. This strikes me as bad programming practice. Errors should be reported, not silently ignored. If the applic

Re: [GENERAL] Change config of running PGSQL

2004-08-31 Thread Doug McNaught
"McDougall, Marshall (FSH)" <[EMAIL PROTECTED]> writes: > I have an existing installation of 7.3.4 that appears to have been made with > "--without-readline and --without-zlib" parameters used at build time. How > do I change those parms without reinstalling the whole thing. I would > normally

Re: [GENERAL] Single Row Table?

2004-08-31 Thread Jeff Eckermann
--- Scott Marlowe <[EMAIL PROTECTED]> wrote: > On Sun, 2004-08-29 at 15:30, Bruno Wolff III wrote: > > On Fri, Aug 27, 2004 at 13:32:07 +0530, > > Yateen Joshi <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > I have got a table which is supposed to contain > only one row. It does > > > not ha

Re: [GENERAL] DB failure?

2004-08-31 Thread Chester Kustarz
On Mon, 30 Aug 2004, Wes Palmer wrote: > PostgreSQL: 7.4.1 > > Last week, I had a corrupt index on one table with 2 million rows. On a > specific search, the database would SEGV. I dropped and recreated the index > involved in the search, and did a REINDEX on the primary key. That problem > went

[GENERAL] Change config of running PGSQL

2004-08-31 Thread McDougall, Marshall (FSH)
I have an existing installation of 7.3.4 that appears to have been made with "--without-readline and --without-zlib" parameters used at build time. How do I change those parms without reinstalling the whole thing. I would normally go through the archives, but they appear to be unavailable. All

[GENERAL] functions/stored procedures

2004-08-31 Thread Dennis Gearon
please CC me. Are the UDF/functions/procedures written by users available in all schemas in a DB? ---(end of broadcast)--- TIP 7: don't forget to increase your free space map settings

Re: [GENERAL] Overloading '<' operator

2004-08-31 Thread Tom Lane
Peter Eisentraut <[EMAIL PROTECTED]> writes: > Am Dienstag, 31. August 2004 15:18 schrieb Suresh Tri: >> Can any one tell how to use the previous version of ooperator while >> overloading one. > Don't call the previous operator, call the function underlying the previous > operator. Or put them i

[GENERAL] sequences in schemas

2004-08-31 Thread Joe Maldonado
Hello, How come within a create schema block I cannot create a sequence? I have entered in: CREATE SCHEMA joe CREATE SEQUENCE joe_seq start 1 CREATE TABLE joe_table (int id, varchar name) ; and I get a syntax error for SEQUENCE. though if it is just tables I do not -Joe --