Re: [GENERAL] weekday from timestamp?

2008-09-12 Thread Dann Corbit
> -Original Message- > From: [EMAIL PROTECTED] [mailto:pgsql-general- > [EMAIL PROTECTED] On Behalf Of ..::rDk::.. > Sent: Sunday, September 07, 2008 8:08 PM > To: pgsql-general@postgresql.org > Subject: [GENERAL] weekday from timestamp? > > im strugling with my dataset.. > > got a small

[GENERAL] Getting rows in a very specific order

2008-09-12 Thread Gordon
I'm considering using an array of ints column in a table which lists a row's ancestry. For example, if item 97 is contained within itme 68 and that item is contained with in 31 and that item is contained within item 1 then the value of the hierachy column would be {1,31,68,97}, the numbers refer t

[GENERAL] Postgres 8.3.1 RowExclusiveLock With JDBC XA

2008-09-12 Thread Urciolo, Kevin
I am having a problem where row exclusive locks are causing applications and vacuums to hang. I shutdown all applications, but the locks remain. I stop and start postgres, but the locks are still there. A pid is not listed. This problem started showing up after switching to the XA datasource wit

[GENERAL] weekday from timestamp?

2008-09-12 Thread ..::rDk::..
im strugling with my dataset.. got a small pgsql db with a timestamp column in format :MM:DD HH:MM:SS for each record how could i possibly return day of the week for every record? any help will be much appreciated cheers r -- Sent via pgsql-general mailing list (pgsql-general@postgresql.or

[GENERAL] You need to rebuild PostgreSQL using --with-libxml.

2008-09-12 Thread Ricardo Antonio Yepez Jimenez
Hi, As I compile postgresql 8.3.2 to support sql / xml, Red hat 5.1 enterprise edition, I need to know the steps to comfigurarlo, if someone owns a manual. Thank you. .

Re: [GENERAL] OS X library path issues for libpq (ver 8.3

2008-09-12 Thread Jerry LeVan
Have you tried putting your environmental variables in: .MacOSX I have some apps that need access to some PG enviromental variables and I had to put them in a plist in the directory .MacOSX e.g. [mbp:~/.MacOSX]$ ls -al ~/.MacOSX total 8 drwxr-xr-x3 jerry jerry 102 Jun 25 2007 .

[GENERAL] pg_dumpall problem when roles have default schemas

2008-09-12 Thread btober
I've run into a problem while migrating an existing 8.2.7 data base to a new server running 8.3.3 (although I think the version numbers may not matter -- I think I've seen this problem in the past and just lived with it since so much of Postgresql is so great!). The problem stems from the fac

[GENERAL] Hi

2008-09-12 Thread Harshad Pethe
Hi, First of all a big thank you for all the guys at Postgres . I love you all for the whole system you have to put up ! I just have one problem that I can't get to set my general mailing list to weekly or monthly. I want to have it as a digest ; any digest upwards of weekly

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 ca

Re: [GENERAL] Fastest way to restore a database

2008-09-12 Thread Greg Smith
On Fri, 12 Sep 2008, Robert Treat wrote: Don't forget to bump up checkpoint_timeout along with that... actually, I blogged a couple of times on this topic And with that there's enough information to start a dedicated page on this topic: http://wiki.postgresql.org/wiki/Bulk_Loading_and_Restor

Re: [GENERAL] psql scripting tutorials

2008-09-12 Thread Blazej
> Ok then. Does anyone have any tips or best practices for scripting psql? > > I'll probably write some bash scripts to pull csv files over then script > psql to do a COPY into an import schema then run a pl/pgsql procedure, er > function, to do all ETL. > > Who else is doing something like this? C

Re: [GENERAL] Fastest way to restore a database

2008-09-12 Thread Tom Lane
Scott Ribe <[EMAIL PROTECTED]> writes: >> The worry expressed upthread about the transaction being "too large" is >> unfounded, btw. Unlike some other DBs, PG doesn't have a finite-size >> undo log. > Sure, it won't fail. But would there be some point at which it would become > slower than multip

Re: [GENERAL] Fastest way to restore a database

2008-09-12 Thread Scott Ribe
> The worry expressed upthread about the transaction being "too large" is > unfounded, btw. Unlike some other DBs, PG doesn't have a finite-size > undo log. Sure, it won't fail. But would there be some point at which it would become slower than multiple transactions? Or is it always faster (or at

Re: [GENERAL] Fastest way to restore a database

2008-09-12 Thread Robert Treat
On Friday 12 September 2008 14:32:07 Greg Smith wrote: > On Fri, 12 Sep 2008, William Garrison wrote: > > Is there a definitive list of things to do? > > That section of the documention is pretty good: > http://www.postgresql.org/docs/current/static/populate.html > > The main thing it's missing is

Re: [GENERAL] Fastest way to restore a database

2008-09-12 Thread Tom Lane
William Garrison <[EMAIL PROTECTED]> writes: > So... if I am using pg_dump and pg_restore with a compressed backup, > then it is using COPY, correct? And I think that would follow a CREATE > TABLE statement as mentioned in the first link... so no WAL files written? Only if you use --single-tran

Re: [GENERAL] Fastest way to restore a database

2008-09-12 Thread William Garrison
Thanks so much! So... if I am using pg_dump and pg_restore with a compressed backup, then it is using COPY, correct? And I think that would follow a CREATE TABLE statement as mentioned in the first link... so no WAL files written? Greg Smith wrote: On Fri, 12 Sep 2008, William Garrison wrot

Re: [GENERAL] connection timeouts and "killing" users

2008-09-12 Thread Erik Jones
On Sep 11, 2008, at 12:02 PM, Scott Marlowe wrote: I don't think so. What might work best is to have two pg_hba.conf files, and link to each one. so one is pg_hba.conf.lockout and one is pg_hba.conf.normal, let's say. lockout is set to only answer to the postgres user. Switch the pg_hba.co

Re: [GENERAL] Fastest way to restore a database

2008-09-12 Thread Greg Smith
On Fri, 12 Sep 2008, William Garrison wrote: Is there a definitive list of things to do? That section of the documention is pretty good: http://www.postgresql.org/docs/current/static/populate.html The main thing it's missing is a discussion of how to cut down on disk commit overhead by eit

[GENERAL] pg_restore parameters

2008-09-12 Thread Kevin Duffy
Hello: I am move to a new production server and am testing my backup and restore procedures. Given a backup created with the follow command C:\>C:\progFiles\PostgreSQL\8.2\bin\pg_dump -Fc -b -C -o -f E:\backupPostgres\benchxx_c20080912.backup -U postgres benchxx_c What is the best w

Re: [GENERAL] TSearch2: find a QUERY that does match a single document

2008-09-12 Thread Oleg Bartunov
On Fri, 12 Sep 2008, Dmitry Koterov wrote: Hello. TSearch2 allows to search a table of tsvectors by a single tsquery. I need to solve the reverse problem. *I have a large table of tsquery. I need to find all tsqueries in that table that match a single document tsvector: * CREATE TABLE "test"."

[GENERAL] Fastest way to restore a database

2008-09-12 Thread William Garrison
I know that PostgreSQL is slow at restoring databases. But there are some tricks to use when speeding it up. Here is a brief list I compiled from reading the docs and reading some forums. Is there a definitive list of things to do? * Turn off fsync So it won’t flush after every commit * Turn o

Re: [GENERAL] Converting string to IN query

2008-09-12 Thread Sam Mason
On Fri, Sep 12, 2008 at 04:04:18PM +0100, Richard Huxton wrote: > Andrus wrote: > > String contains list of document numbers (integers) like: > > > > '1,3,4' > > > > How to SELECT documents whose numbers are contained in this string. > > > Numbers should be passed as single string literal since

[GENERAL] TSearch2: find a QUERY that does match a single document

2008-09-12 Thread Dmitry Koterov
Hello. TSearch2 allows to search a table of tsvectors by a single tsquery. I need to solve the reverse problem. *I have a large table of tsquery. I need to find all tsqueries in that table that match a single document tsvector: * CREATE TABLE "test"."test_tsq" ( "id" SERIAL, "q" TSQUERY NOT N

Re: [GENERAL] Converting string to IN query

2008-09-12 Thread Richard Huxton
Andrus wrote: > String contains list of document numbers (integers) like: > > '1,3,4' > > How to SELECT documents whose numbers are contained in this string. > Numbers should be passed as single string literal since FYIReporting > RDLEngine does not allow multivalue parameters. Hmm - might be w

Re: [GENERAL] Converting string to IN query

2008-09-12 Thread André Volpato
Andrus escreveu: SELECT * FROM invoices WHERE invoiceno IN ( '1,3,4' ); but this causes error. change it to ( '1','3','4' ) or ( 1,3,4 ) -- ACV -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/p

Re: [GENERAL] Autocommit, isolation level, and vacuum behavior

2008-09-12 Thread Jack Orenstein
Tomasz Ostrowski wrote: On 2008-09-11 17:21, Jack Orenstein wrote: The id > last_id trick doesn't work for me -- I don't have an index that would support it efficiently. You do not have a primary key? If you do then you have an index as it is automatically created. Sorry, I misspoke. I have

Re: [GENERAL] Autocommit, isolation level, and vacuum behavior

2008-09-12 Thread Jack Orenstein
Tomasz Ostrowski wrote: On 2008-09-11 18:03, Jack Orenstein wrote: When you do: result = query("select something from sometable") then all rows of a result will be cached by a client program. I am very sure this is not happening. Maybe some rows are being cached (specifying fetch size), but c

[GENERAL] Converting string to IN query

2008-09-12 Thread Andrus
String contains list of document numbers (integers) like: '1,3,4' How to SELECT documents whose numbers are contained in this string. I tried create temp table invoices ( invoiceno int ); insert into invoices values (1); insert into invoices values (2); insert into invoices values (3); insert i

Re: [GENERAL] psql scripting tutorials

2008-09-12 Thread Peter Eisentraut
Alvaro Herrera wrote: Doesn't say about variable expansion ... And it seems to be in a different realm, because the point is that the command is going to have a single destination (either \-processing or sending it to the server). Is psql being just lazy here and avoiding parsing the command?

Re: [GENERAL] Autocommit, isolation level, and vacuum behavior

2008-09-12 Thread Tomasz Ostrowski
On 2008-09-11 17:21, Jack Orenstein wrote: > The id > last_id trick doesn't work for me -- I don't have an index that > would > support it efficiently. You do not have a primary key? If you do then you have an index as it is automatically created. Watch this: test=> create temporary table tes