[GENERAL] Documentation suggestion

2011-05-10 Thread Thomas Kellerer
Hi, I'd like to suggest a little enhancement to the documentation chapter about file-system backup http://www.postgresql.org/docs/current/static/backup-file.html As I regularly see people copying files between different operating systems, I think it would be a good idea to add a third restrict

[GENERAL] Index bloat with "USING GIN(varchar[])" index?

2011-05-10 Thread Eric Ridge
PostgreSQL 8.4.8 on i386-apple-darwin10.7.0, compiled by GCC i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664), 64-bit I'm not sure exactly what's going on, but I've got a table defined like this: CREATE TABLE foo ( ... tags varchar(1000)[], ... ); CREATE INDEX i

[GENERAL] One-off attempt at catalog hacking to turn bytea column into text

2011-05-10 Thread Vlad Romascanu
Hello, As a one-off attempt to change a large table's 'bytea' column to 'text' with minimal I/O (where the 'bytea' contents is already valid UTF8 and the database encoding is also UTF8, and the column is not part of any index or anything involving collation), how unsafe is the following? UPDATE p

Re: [GENERAL] Table name as parameter

2011-05-10 Thread Andreas Joseph Krogh
On 05/09/2011 10:59 PM, Adrian Klaver wrote: > On 05/09/2011 12:33 PM, Sairam Krishnamurthy wrote: >> All, >> >> I have a function that takes the table name the parameter. After some >> digging I found that this can be made possible by have the query as a >> string and EXECUTE it. >> >> EXECUTE 'SE

Re: [GENERAL] track functions call

2011-05-10 Thread Cédric Villemain
2011/5/10 Mark : > Is there in PostgreSQL posibility to track which function in C file is called > by postgres functions. For example I would like to see which functions are > calling in ts_rank. select proname,prosrc from pg_proc where proname = 'ts_rank'; proname |prosrc -+-

Re: [GENERAL] temporarily disabling foreign keys

2011-05-10 Thread Scott Marlowe
On Tue, May 10, 2011 at 12:12 PM, Seb wrote: > Hi, > > I'm not sure how best to handle this situation.  The tables in a > database need to be completely cleared and copy'ed into about every few > months, as they are updated with new records and corrections from a > provider.  Because the tables ha

Re: [GENERAL] temporarily disabling foreign keys

2011-05-10 Thread John R Pierce
On 05/10/11 11:12 AM, Seb wrote: Hi, I'm not sure how best to handle this situation. The tables in a database need to be completely cleared and copy'ed into about every few months, as they are updated with new records and corrections from a provider. Because the tables have foreign key constra

Re: [GENERAL] temporarily disabling foreign keys

2011-05-10 Thread Vick Khera
in recent versions of postgres, there is a "replication" mode designed specifically for replication software to disable FK's and other triggers. Perhaps investigate that. the other option is to make your FK's deferrable, and do all your delete in one big transaction with the FK checks deferred.

[GENERAL] temporarily disabling foreign keys

2011-05-10 Thread Seb
Hi, I'm not sure how best to handle this situation. The tables in a database need to be completely cleared and copy'ed into about every few months, as they are updated with new records and corrections from a provider. Because the tables have foreign key constraints with 'ON UPDATE CASCADE ON DEL

Re: [GENERAL] what is way to specify a DOCTYPE for output from SQL/XML

2011-05-10 Thread Pavel Stehule
2011/5/10 John R Pierce : > On 05/10/11 9:07 AM, Pavel Stehule wrote: >> >> Hello >> >> I would to append a doctype declaration to result of xmlelement function. > > like, > >    select '' || xmlelement() yes, it is simple way. I am interesting about using SQL/XML functionality Regards

Re: [GENERAL] what is way to specify a DOCTYPE for output from SQL/XML

2011-05-10 Thread John R Pierce
On 05/10/11 9:07 AM, Pavel Stehule wrote: Hello I would to append a doctype declaration to result of xmlelement function. like, select '' || xmlelement() ? -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.po

Re: [GENERAL] stunnel with just postgresql client part

2011-05-10 Thread Merlin Moncure
On Tue, May 10, 2011 at 6:09 AM, zhong ming wu wrote: > On Mon, May 9, 2011 at 10:50 PM, Merlin Moncure wrote: > >> Now manybe *I'm* a little confused.  Are you connecting to the write >> port (stunnel's secure port)? As I understand it, the stunnel pgsql >> protocol is such that the client side

Re: [GENERAL] PGA

2011-05-10 Thread Andrew Sullivan
On Tue, May 10, 2011 at 06:53:11AM -0700, salah jubeh wrote: > pga_diagrams pga_forms pga_graphs pga_images pga_queries > pga_reports > pga_scripts > > > I am wondering are those tables are part of postgres installation. if yes > what > are used for because all these tables are

Re: [GENERAL] COPY complaining about unquoted carriage return found in data... in a quoted field

2011-05-10 Thread Ivan Sergio Borgonovo
On Tue, 10 May 2011 14:38:23 +0200 Pavel Stehule wrote: > Hello > > COPY doesn't like '\n' too. > > Replace '\n' by '\\n' mmm maybe you were mislead by the "semi-transliterated" hexdump. There is no "slash" in the record, the actual input was the one reported in hex. The following line was ju

[GENERAL] PGA

2011-05-10 Thread salah jubeh
I have a PostgreSQL server v. 8.3 installation. I have noticed that there are tables that begin with the prefix pga. The list of tables is as follow: pga_diagrams pga_forms pga_graphs pga_images pga_queries pga_reports pga_scripts I am wondering are those tables are part of po

Re: [GENERAL] COPY complaining about unquoted carriage return found in data... in a quoted field

2011-05-10 Thread Pavel Stehule
Hello COPY doesn't like '\n' too. Replace '\n' by '\\n' Regards Pavel Stehule 2011/5/10 Ivan Sergio Borgonovo : > I'm on pg 8.3.14 > I'm trying to import a csv with > > \copy anagraficaclienti from >  'myfile.csv' >  delimiter as E'       '  -- this is a tab \t >  null as 'NULL' >  csv >    he

[GENERAL] COPY complaining about unquoted carriage return found in data... in a quoted field

2011-05-10 Thread Ivan Sergio Borgonovo
I'm on pg 8.3.14 I'm trying to import a csv with \copy anagraficaclienti from 'myfile.csv' delimiter as E' ' -- this is a tab \t null as 'NULL' csv header quote as E'"' escape as E'\\' What I get is ERROR: unquoted carriage return found in data HINT: Use quoted CSV f

Re: [GENERAL] FILLFACTOR and increasing index

2011-05-10 Thread tv
> >> What about the index size? How much space do they occupy? Analyze the >> table and do this > > > Of course space is different. That's not the point. The point is: I'm > willing > to pay the price for another HD, if that helps with performance. But it > doesn't. > >> >> The minimal performance

[GENERAL] track functions call

2011-05-10 Thread Mark
Is there in PostgreSQL posibility to track which function in C file is called by postgres functions. For example I would like to see which functions are calling in ts_rank. Thanks for reply Mark -- View this message in context: http://postgresql.1045698.n5.nabble.com/track-functions-call-tp438422

Re: [GENERAL] FILLFACTOR and increasing index

2011-05-10 Thread Leonardo Francalanci
> What about the index size? How much space do they occupy? Analyze the > table and do this Of course space is different. That's not the point. The point is: I'm willing to pay the price for another HD, if that helps with performance. But it doesn't. > > The minimal performance difference is

Re: [GENERAL] stunnel with just postgresql client part

2011-05-10 Thread zhong ming wu
On Mon, May 9, 2011 at 10:50 PM, Merlin Moncure wrote: > Now manybe *I'm* a little confused.  Are you connecting to the write > port (stunnel's secure port)? As I understand it, the stunnel pgsql > protocol is such that the client side libpq application can connect to > stunnel which unwraps the

Re: [GENERAL] FILLFACTOR and increasing index

2011-05-10 Thread tv
>> Yes, I use the same approach, but I'm not aware of any such guideline >> related to fillfactor with indexes. Anyway those guidelines need to be >> written by someone, so you have a great opportunity ;-) > > > I did a quick test using your example. As in your test, "increasing" > values don't

Re: [GENERAL] FILLFACTOR and increasing index

2011-05-10 Thread Leonardo Francalanci
> Yes, I use the same approach, but I'm not aware of any such guideline > related to fillfactor with indexes. Anyway those guidelines need to be > written by someone, so you have a great opportunity ;-) I did a quick test using your example. As in your test, "increasing" values don't get any g