[GENERAL] Error dropping non-existent tables

2004-11-19 Thread Baldeep Hira
Hi, I am a new PostgreSQL user and am not sure if this is the correct list for this question, please redirect me to the correct list, if needed? I recently starting using PostgreSQL 8.0.0-beta4 (Win32) and want to migrate some of the SQL scripts written for MySQL to PostgreSQL. I have the follow

Re: [GENERAL] How to make lo_import and lo_export to use file

2004-11-19 Thread Premsun Choltanwanich
I'm new for PostgreSQL. How can I check that what thing I use? >>> Tom Lane <[EMAIL PROTECTED]> 19/11/2004 10:02:44 pm >>> "Premsun Choltanwanich" <[EMAIL PROTECTED]> writes: > Could I make lo_import and lo_export to use file on client local > machine? If you're using libpq, it has lo_export and

Re: [GENERAL] pg_dumpall + restore = missing view

2004-11-19 Thread Tom Lane
Steve Crawford <[EMAIL PROTECTED]> writes: > This appears to have all gone well execpt that one view is missing. > I've restored that view by hand but am curious if this is a PG bug or > failure of the nut behind the wheel. > The view involves the union of many tables and its creation failed >

[GENERAL] pg_dumpall + restore = missing view

2004-11-19 Thread Steve Crawford
During last night's "maintenance window" (er, unplanned loss of connectivity due to workers diamond-core-drilling through an OC12 as part of, I kid you not, installation of a new toilet) I upgraded from 7.4.1 to 7.4.6. Basic method: Build 7.4.6 Backup db: pg_dumpall > dumpfile Install: stop 7.4

Re: [GENERAL] altre table and large object deletion

2004-11-19 Thread Tom Lane
Jeremiah Jahn <[EMAIL PROTECTED]> writes: > will an alter table that removes an oid type also remove all of the > associated large objects. No, but see contrib/vacuumlo. regards, tom lane ---(end of broadcast)--- TIP 4: Don'

Re: [GENERAL] phpPgAdmin problem - this list?

2004-11-19 Thread Matt
> However the /usr/lib/php/extensions directory *has* got the pgsql.so > library file, so can anyone suggest what might be wrong? Or > alternatively point me to somewhere better to ask? Try one of the php lists. But check that the extension is enabled in the php.ini first (uncomment the extension

[GENERAL] Posting COPY data with shared sequences

2004-11-19 Thread Robert Fitzpatrick
I share the same sequences across 3 tables and have a COPY that send data to one of those tables. That table has a before insert trigger function that looks for a condition and redirect records to the other two depending on that condition result. Sharing the sequence is needed to act as a primary k

[GENERAL] altre table and large object deletion

2004-11-19 Thread Jeremiah Jahn
will an alter table that removes an oid type also remove all of the associated large objects. I've been using blobs but have converted to byte arrays, now I need to get rid of all of the blobs. Will this be enough? followed by a vaccum of course. -- Jeremiah Jahn <[EMAIL PROTECTED]> --

Re: [GENERAL] PostegreSQL 8.0.0 Beta4 Win32

2004-11-19 Thread Magnus Hagander
Title: Message Some wishes : - The win32 install let choose an alternate disk for the data ...    Already supported. Just click the "Data Directory" entry in the feature tree, click "Browse" and pick where you want the data directory.  - The win32 install use the user variable P

[GENERAL] phpPgAdmin problem - this list?

2004-11-19 Thread Chris Green
I'm not sure if this is really on topic for this list but I'll start here. I'm trying to run phpPgAdmin, I've installed version 3.5, I have postgresql version 7.4.3 running on slackware 9.1. I already have phpMyAdmin running successfully. When I try and run phpPgAdmin I get:- "Your PHP inst

Re: [GENERAL] Can COPY skip columns?

2004-11-19 Thread Ian Harding
Since we can specify the order of columns in copy, how hard would it be (he asked, naively) to specify a column name that points to /dev/null (or the postgresql internals equivalent)? Sybase's copy utility is very similar to our copy, and has a function that you can specify in your column list ins

Re: [GENERAL] Can COPY skip a header line?

2004-11-19 Thread Pierre-Frédéric Caillaud
can do this fine with small files But if I get above a 1000 rows it takes so long it time out. PHP is slow, but not *that* slow, you have a problem somewhere ! I can upload a 10,000 row equivalent file using COPY from psql in 2 seconds, so the time is down to the PHP processing (really a

Re: [GENERAL] Phantom user in db--'128'

2004-11-19 Thread Taber, Mark
Thanks! Worked like a charm. Mark Taber State of California Department of Finance Infrastructure & Architecture 916.323.3104 x 2945 [EMAIL PROTECTED] -Original Message- From: Tom Lane [mailto:[EMAIL PROTECTED] Sent: Friday, November 19, 2004 7:42 AM To: Taber, Mark Cc: [EMAIL PROTECT

Re: [GENERAL] Can COPY skip a header line?

2004-11-19 Thread Matteo Beccati
Hi, Can I get PHP to remove the first row without reading the whole file in? If there was a way where PHP would just chop the first row off that would be ideal... If you are using "COPY table FROM stdin" and pg_put_line() it's not much difficult to skip the first line ;) Best regards -- Matteo Be

Re: [GENERAL] PostegreSQL 8.0.0 Beta4 Win32

2004-11-19 Thread Tom Lane
=?iso-8859-1?Q?Secr=E9tariat?= <[EMAIL PROTECTED]> writes: > When I connect as localhost I obtain : > "Error connecting to the server: couldnot connect to server: Connection > refused (0x274d/10061) > Is the server running on host "127.0.0.1" and accepting > TCP/IP connections on port

Re: [GENERAL] Can COPY skip a header line?

2004-11-19 Thread Joshua D. Drake
pg_put_Line) I liked Toms idea to create a temporary table, but I need to be able to get rid of the header row then... Is there anyway of avoiding getting PHP involved in the file processing? You could write a server side function to do the processing. You could even use plPHP if that is your pref

Re: [GENERAL] PostegreSQL 8.0.0 Beta4 Win32

2004-11-19 Thread Secrétariat
When I connect as localhost I obtain : "Error connecting to the server: couldnot connect to server: Connection refused (0x274d/10061) Is the server running on host "127.0.0.1" and accepting TCP/IP connections on port 5432 ?" My pg-hba.conf seems correct (transmitted). - Original Mes

Re: [GENERAL] Can COPY skip a header line?

2004-11-19 Thread Adam Witney
Hi Martijn, Can I get PHP to remove the first row without reading the whole file in? If there was a way where PHP would just chop the first row off that would be ideal... Thanks adam > Wouldn't it be easier to have PHP remove the first row? > > And PHP has to be there because Apache is sendin

Re: [GENERAL] Can COPY skip a header line?

2004-11-19 Thread Martijn van Oosterhout
Wouldn't it be easier to have PHP remove the first row? And PHP has to be there because Apache is sending all the data to it. Hope this helps, On Fri, Nov 19, 2004 at 03:43:18PM +, Adam Witney wrote: > > Following on from my question yesterday... Can COPY then be made to skip a > header lin

Re: [GENERAL] PostegreSQL 8.0.0 Beta4 Win32

2004-11-19 Thread Tom Lane
=?iso-8859-1?Q?Secr=E9tariat?= <[EMAIL PROTECTED]> writes: > The file F:\PostgreSQL\8.0.0-beta4\data\pg_hba.conf contain : > # TYPE DATABASE USER CIDR-ADDRESS METHOD > local allallmd5 > # IPv4 local connections: > host all all

[GENERAL] Can COPY skip a header line?

2004-11-19 Thread Adam Witney
Following on from my question yesterday... Can COPY then be made to skip a header line (the first line of the file say)? The problem is this... I need to allow a user to upload a data file through a web browser (PHP driven). This is then processed and the selected file columns mapped to fields in

[GENERAL] PostegreSQL 8.0.0 Beta4 Win32

2004-11-19 Thread Secrétariat
Hello !   The RC2 is great but : I use an other filesystem for the data. So I have C:\Program file\PostgreSQL... and I have F:\PostgreSQL\8.0.0-beta4\data.   In the file C:\Program Files\PostgreSQL\8.0.0-beta4\data\postgresql.conf I modify the files locations : data_directory = 'F:/PostgreS

Re: [GENERAL] Phantom user in db--'128'

2004-11-19 Thread Tom Lane
"Taber, Mark" <[EMAIL PROTECTED]> writes: > While using pg_dump and pg_restore (or attempting to restore, more > precisely), the process failed because of a missing user, user '128'. I > never created such a user, and when going to Privileges, such a user does > not exist in the list. However, whil

Re: [GENERAL] index and queries using '<' '>'

2004-11-19 Thread Stephan Szabo
On Fri, 19 Nov 2004, Marc Boucher wrote: > At 16:23 18/11/2004 +0100, Martijn van Oosterhout wrote: > > The system seems to think that a scan is cheap because the table is so > > small. > The table currently contains just over 1 elements. So 238 rows is a > small part of it. > > > Have you ev

[GENERAL] Phantom user in db--'128'

2004-11-19 Thread Taber, Mark
Title: Phantom user in db--'128' I posted this earlier, and got no responses.  While using pg_dump and pg_restore (or attempting to restore, more precisely), the process failed because of a missing user, user '128'. I never created such a user, and when going to Privileges, such a user does n

Re: [GENERAL] index and queries using '<' '>'

2004-11-19 Thread Tom Lane
Marc Boucher <[EMAIL PROTECTED]> writes: >> Index scans aren't always faster than sequential scans. > I know that, but I've some comparisons with other queries. And someone > advised me to try "set enable_seqscan=off;". It takes 50-60% (after > checking right now) less to use the index. Unfortunat

Re: [GENERAL] index and queries using '<' '>'

2004-11-19 Thread Bruno Wolff III
On Fri, Nov 19, 2004 at 15:47:21 +0100, Marc Boucher <[EMAIL PROTECTED]> wrote: > I know that, but I've some comparisons with other queries. And someone > advised me to try "set enable_seqscan=off;". It takes 50-60% (after > checking right now) less to use the index. Unfortunately I can't use thi

Re: [GENERAL] How to make lo_import and lo_export to use file on client local machine?

2004-11-19 Thread Tom Lane
"Premsun Choltanwanich" <[EMAIL PROTECTED]> writes: > Could I make lo_import and lo_export to use file on client local > machine? If you're using libpq, it has lo_export and lo_import functions. If you're using some other client-side code, see its documentation. regards, t

Re: [GENERAL] index and queries using '<' '>'

2004-11-19 Thread Marc Boucher
At 08:16 19/11/2004 -0600, Bruno Wolff III wrote: >> The table currently contains just over 1 elements. So 238 rows is a >> small part of it. > No, small is typically less than 1%. This depends on the size of the rows > and how much better accessing disk blocks sequentially is in your > envirom

Re: [GENERAL] index and queries using '<' '>'

2004-11-19 Thread Bruno Wolff III
On Fri, Nov 19, 2004 at 14:45:04 +0100, Marc Boucher <[EMAIL PROTECTED]> wrote: > At 16:23 18/11/2004 +0100, Martijn van Oosterhout wrote: > > The system seems to think that a scan is cheap because the table is so > > small. > The table currently contains just over 1 elements. So 238 rows is

Re: [GENERAL] index and queries using '<' '>'

2004-11-19 Thread Marc Boucher
At 16:23 18/11/2004 +0100, Martijn van Oosterhout wrote: > The system seems to think that a scan is cheap because the table is so > small. The table currently contains just over 1 elements. So 238 rows is a small part of it. > Have you ever ANALYZEd that table? Yes. That and reindex (in case o

Re: [GENERAL] pgEdit public beta for Macintosh and Windows

2004-11-19 Thread John DeSoi
On Nov 19, 2004, at 7:13 AM, Jim Seymour wrote: It does not use Java ... [snip] This is supposed to be an advantage? Absolutely. The situation on Linux and Windows may be better, but it is immediately obvious on the Mac when a GUI app

Re: [GENERAL] pgEdit public beta for Macintosh and Windows

2004-11-19 Thread Jim Seymour
John DeSoi <[EMAIL PROTECTED]> wrote: > > The first public beta for pgEdit is now available ... [snip] > > * Cross platform and easy to install > > pgEdit is a native application for both Macintosh and Windows. That's what you call "cross-platform," eh? >

[GENERAL] Batching multiple CREATE TABLE commands

2004-11-19 Thread Richard Huxton
Nageshwar Rao wrote: Hi, I have set of create table statements. I need to execute them at one go instead of running individual statement to create a table. Help ! Nageshwar - two tips for posting to the mailing lists 1. Don't reply to an existing message with a new question 2. Make sure the subje

[GENERAL] How to make lo_import and lo_export to use file on client local machine?

2004-11-19 Thread Premsun Choltanwanich
I try to use lo_import and lo_export for manage large object on PostgreSQL. I found that all files must be process on server with these commands. Could I make lo_import and lo_export to use file on client local machine? And How? Or Is it has other ways to manage large object that process is betwe

Re: [GENERAL] How to make a good documentation of a database ?

2004-11-19 Thread David Pradier
Thanks to everybody, Matt, Timothy, Richard, Csaba, Chris and George for your help :-) Finally, I think the right way to go for me is to generate an html output with postgresql-autodoc and make it accessible to every developer. Thanks a lot for your help ! -- [EMAIL PROTECTED] - tel: 01.46.47.2