Re: [GENERAL] Excessive (and slow) fsync() within single transaction

2009-12-10 Thread Bill Todd
Greg Smith wrote: Stephen Tyler wrote: So a "typical" checkpoint is around 200K buffers (1.5GBytes, 40% of max), taking around 150 seconds to write (10MByte/second, 1300 buffers/second), and around 150 seconds to sync. Your problem may very well be plain old lack of disk I/O throughput, and fs

Re: [GENERAL] quote string exactly as it is

2009-12-02 Thread Bill Todd
My solution was to set standard_conforming_strings = on in postgresql.conf. Bill dario@libero.it wrote: Hello, How can I quote a string *exactly* as it is? I tried using quote_literal() but it doesn't return what I need in some cases. E.g. If my string is: ss\\\ss And I do: select

Re: [GENERAL] How use input parameter as path to COPY in function?

2009-11-26 Thread Bill Todd
Thanks Tom. As usual, I learned a lot more from your reply than just the answer to my question . Bill Tom Lane wrote: Bill Todd writes: I am missing something basic. How can I use an input parameter as the destination path in a COPY statement in a function. plpgsql can only

[GENERAL] How use input parameter as path to COPY in function?

2009-11-25 Thread Bill Todd
I am missing something basic. How can I use an input parameter as the destination path in a COPY statement in a function. The following fails with a syntax error at or near the parameter. CREATE OR REPLACE FUNCTION dvd.export_tables(IN export_path text) RETURNS void AS $$ BEGIN copy dvd.genr

[GENERAL] How identify a long running transaction

2009-11-23 Thread Bill Todd
Using 8.4.1. How can I 1) Get the transaction id of the oldest serializable transaction and the next transaction? 2) A list of all active transactions I have searched the docs and tried Google but I must not be using the right terminology. Also, am I correct in assuming that vacuuming i

Re: [GENERAL] Books, the lulu.com scam

2009-11-21 Thread Bill Todd
The Adobe ebook reader is available for Windows and Mac. I thought Adobe offered a Linux version too but apparently not. It is not Lulu's fault that Adobe does not offer a Linux version of the ebook reader. Bill Alan Gruskoff wrote: So I bought this "book" thinking it was a PDF file which I a

Re: [GENERAL] safelly erasing dirs/files

2009-11-14 Thread Bill Todd
From the on-line help: |DROP DATABASE| drops a database. It removes the catalog entries for the database and deletes the directory containing the data. Joao Ferreira gmail wrote: Hello all, How can I safelly erase (with rm command in Linux) files or dirs concerning a specific database ? a

Re: [GENERAL] Nested transactions

2009-10-12 Thread Bill Todd
Scott Marlowe wrote: On Sun, Oct 11, 2009 at 8:41 PM, Bill Todd wrote: Does PostgreSQL support nested transactions as shown below? BEGIN; ...do some stuff... BEGIN; ...more stuff... COMMIT; COMMIT; Postgresql uses savepoints. Savepoints do not provide the same

[GENERAL] Nested transactions

2009-10-11 Thread Bill Todd
Does PostgreSQL support nested transactions as shown below? BEGIN; ...do some stuff... BEGIN; ...more stuff... COMMIT; COMMIT; Bill -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

[GENERAL] Cannot upgrade to 8.4.1 on Windows

2009-10-10 Thread Bill Todd
I am a PostgreSQL novice. I successfully installed 8.3.3 on a Windows XP Pro machine using the pgInstaller and have been using it since. Now I want to upgrade to 8.4.1. The only installer I can find for Windows for 8.4.1 is the One Click installer provided by EnterpriseDB. If I attempt to run

Re: [GENERAL] Version upgrade with tablespace

2009-10-05 Thread Bill Todd
Ignore that. I now see that I must edit the dump file to change the directory for the tablespace before running the restore. Bill Bill Todd wrote: I am new PostgreSQL and am about to attempt to upgrade from 8.3 to 8.4.1. I believe I understand the procedure except for my tablespace. My

[GENERAL] Version upgrade with tablespace

2009-10-05 Thread Bill Todd
I am new PostgreSQL and am about to attempt to upgrade from 8.3 to 8.4.1. I believe I understand the procedure except for my tablespace. My database is in a tablespace named app. When I restore the database dump under 8.4.1 I assume that the tablespace will not be created automatically. Am I

[GENERAL] No connection could be made because the target machine actively refused it

2009-04-21 Thread Bill Todd
I am trying to connect to a PostgreSQL server from another machine on my small home network. When I click the Test button in the ODBC data mnager for my system DSN I get the error "No connection could be made because the target machine actively refused it." That may not be the exact message but

[GENERAL] What must be installed on client for ODBC connection

2009-04-21 Thread Bill Todd
Do I have to install anything in addition to the ODBC driver on my PC in order to connect to a PostgreSQL server on another PC on my network? Bill -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsq

[GENERAL] Include script within a script

2009-03-10 Thread Bill Todd
Is there any mechanism to include (call) one SQL script file from another? Bill -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] COPY questions

2009-02-18 Thread Bill Todd
Adrian Klaver wrote: On Wednesday 18 February 2009 10:56:45 am Bill Todd wrote: If the COPY command fails does it identify the offending row? After reading the manual and the wiki I assume that there is no way to tell copy to start with the Nth record in the input file. Is that correct? It

[GENERAL] COPY questions

2009-02-18 Thread Bill Todd
If the COPY command fails does it identify the offending row? After reading the manual and the wiki I assume that there is no way to tell copy to start with the Nth record in the input file. Is that correct? It seems like such an obvious feature I was surprised not to find it. Thanks. Bill

Re: [GENERAL] How relate pg_class to pg_constraint

2009-01-29 Thread Bill Todd
Bill Todd wrote: I need to join pg_class and pg_constraint to get information about constraints on a table. It appears that pg_constraint.conrelid is the foreign key but I do not see a relid column in pg_class. What column(s) define the relationship between these tables? Thanks. Bill Is the

[GENERAL] How relate pg_class to pg_constraint

2009-01-29 Thread Bill Todd
I need to join pg_class and pg_constraint to get information about constraints on a table. It appears that pg_constraint.conrelid is the foreign key but I do not see a relid column in pg_class. What column(s) define the relationship between these tables? Thanks. Bill -- Sent via pgsql-general

[GENERAL] System table documentation

2009-01-28 Thread Bill Todd
Where can I find documentation for the system tables? I have not found anything in the 8.3.1 documentation. Thanks. Bill -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general

Re: [GENERAL] The difference between RESTRICT and NO ACTION

2009-01-26 Thread Bill Todd
Bill Todd wrote: In discussing foreign key constraints the manual makes the following statement about the difference between RESTRICT and NO ACTION. "(The essential difference between these two choices is that |NO ACTION| allows the check to be deferred until later in the transa

[GENERAL] The difference between RESTRICT and NO ACTION

2009-01-26 Thread Bill Todd
In discussing foreign key constraints the manual makes the following statement about the difference between RESTRICT and NO ACTION. "(The essential difference between these two choices is that |NO ACTION| allows the check to be deferred until later in the transaction, whereas |RESTRICT| does n

Re: [GENERAL] COPY error with null date

2008-12-07 Thread Bill Todd
Joshua D. Drake wrote: On Fri, 2008-12-05 at 12:00 -0700, Bill Todd wrote: Joshua D. Drake wrote: On Thu, 2008-12-04 at 19:35 -0700, Bill Todd wrote: null as IS NULL results in the following error. ERROR: syntax error at or near "is" LINE 5: null

[GENERAL] COPY error with null date

2008-12-04 Thread Bill Todd
Using 8.3.3 I am trying to import a CSV file using the following copy command. copy billing.contact from 'c:/export/contact.csv' with delimiter as ',' null as '' csv quote as '"'; The following record record causes an error because the third field, "", is a null date and causes the error follo

Re: [GENERAL] COPY with a variable path

2008-11-27 Thread Bill Todd
Raymond O'Donnell wrote: On 27/11/2008 20:52, Bill Todd wrote: Substituting the input parameter for the literal path does not work and neither does using PREPARE/EXECUTE. How can I pass the file path as a parameter? You could write a pl/pgsql function which constructs the query

Re: [GENERAL] COPY with a variable path

2008-11-27 Thread Bill Todd
Raymond O'Donnell wrote: On 27/11/2008 20:52, Bill Todd wrote: Substituting the input parameter for the literal path does not work and neither does using PREPARE/EXECUTE. How can I pass the file path as a parameter? You could write a pl/pgsql function which constructs the query

[GENERAL] COPY with a variable path

2008-11-27 Thread Bill Todd
I want to execute the following COPY command in a stored procedure, however, I need to pass the path to the file as an input parameter. Substituting the input parameter for the literal path does not work and neither does using PREPARE/EXECUTE. How can I pass the file path as a parameter? cop

[GENERAL] Cannot restore table using pg_restore

2008-11-25 Thread Bill Todd
I am new to PostgreSQL and am running 8.3.3 on Windows XP Pro SP3. I have dumped a database using the following command. pg_dump --format=custom --username=postgres --file=c:\pgdb\dumps\app.backup app I am trying to restore a table named contact in the contact schema. I have tried two metho

Re: [GENERAL] Windows ODBC Driver

2008-09-12 Thread Bill Todd
Stephen Frost wrote: * Bill Todd ([EMAIL PROTECTED]) wrote: FWIW I cannot get the ODBC driver to work correctly with ADO and the OLE DB provider for ODBC. It sees TEXT fields as VARCHAR instead of LONGVARCHAR. I do not know if the problem is at the ODBC level or the ADO level but test

Re: [GENERAL] Windows ODBC Driver

2008-09-11 Thread Bill Todd
Stephen Frost wrote: Greg, * Greg Lindstrom ([EMAIL PROTECTED]) wrote: I would like to connect to Postgres from Python running on a Windows box. I need the ODBC driver to create a windows ODBC datasource. I've been looking for two days and have found lots of dead links, but no drivers. Ca

Re: [GENERAL] Oracle and Postgresql

2008-08-31 Thread Bill Todd
Another thing that has only been mentioned obliquely is support. When an organization selects an enterprise wide mission critical database system they get a lot of perceived security from purchasing a world-wide 24x7 support contract from a company with the resources that Oracle can provide. Ye

[GENERAL] SELECT INTO returns incorrect values

2008-08-29 Thread Bill Todd
The following SELECT INTO returns incorrect values in the variables CATEGORY_NAME and PARENT_ID. If I copy the SELECT statement to pgAdmin, delete the INTO clause and run the query it returns the correct values. I am new to PostgreSQL and I must have something syntactically wrong in the SELECT

[GENERAL] RAISE NOTICE format in pgAdmin

2008-08-29 Thread Bill Todd
If I have a series of RAISE NOTICE 'xxx' statements in a plpgsql function and I call the function from pgAdmin the notice messages are concatenated on a single line on the Messages tab. Is there any way to get each message to appear on a separate line? Is there a better way than using RAISE NO