Re: [GENERAL] Build universal binary on Mac OS X 10.6?

2009-12-02 Thread Dave Page
On Wed, Dec 2, 2009 at 1:14 AM, Tom Lane wrote: > Israel Brewster writes: >> I am trying to create a static, universal (x86 and ppc at least - 64 >> bit architectures are optional) build of the PostgreSQL libraries on a >> Mac OS X 10.6 machine. > > I think what you're missing is that the header

[GENERAL] Postgres performance on Veritas VxVM

2009-12-02 Thread River Tarnell
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I'm running Postgres 8.3.7 on Solaris 10 x64, using VxFS/VxVM 5.0 MP3. I'm trying to determine the best storage configuration for my workload, so I ran some tests of Postgres performance with various combinations of VM and filesystem. What I noti

Re: [GENERAL] how to install just client libraries on windows?

2009-12-02 Thread Craig Ringer
On 2/12/2009 12:37 PM, Sachin Srivastava wrote: We have updated the installer to avoid configuring ld.so.conf and instead use rpath linking. Great - hopefully that'll save you time and hassle with the installer in the long run. Thanks for listening - I for one do appreciate the work you folk

Re: [GENERAL] how to install just client libraries on windows?

2009-12-02 Thread Dave Page
On Wed, Dec 2, 2009 at 1:29 AM, Craig Ringer wrote: > EnterpriseDB are currently handling the creation of the binary installers > for PostgreSQL. I've been talking with them about some other installer > issues (where the interferes with system libraries on Linux) too, so > hopefully they'll be do

Re: [GENERAL] Postgres performance on Veritas VxVM

2009-12-02 Thread Greg Smith
River Tarnell wrote: My configuration was a VxFS filesystem mounted at /sql, 'noatime,cio', and another mounted at /sql/pg_xlog, 'noatime,cio,mincache=direct,convosync=direct'. This forced direct I/O for the WAL. Without VxVM, these filesystems were on plain disk slices. With VxVM, I added the

Re: [GENERAL] Build universal binary on Mac OS X 10.6?

2009-12-02 Thread Grzegorz Jaśkiewicz
On Tue, Dec 1, 2009 at 11:43 PM, Israel Brewster wrote: > I am trying to create a static, universal (x86 and ppc at least - 64 bit > architectures are optional) build of the PostgreSQL libraries on a Mac OS X > 10.6 machine. The command line I am using is as follows: > 10.6 is intel only, so why

Re: [GENERAL] Build universal binary on Mac OS X 10.6?

2009-12-02 Thread Dave Page
2009/12/2 Grzegorz Jaśkiewicz : > > > On Tue, Dec 1, 2009 at 11:43 PM, Israel Brewster > wrote: >> >> I am trying to create a static, universal (x86 and ppc at least - 64 bit >> architectures are optional) build of the PostgreSQL libraries on a Mac OS X >> 10.6 machine. The command line I am using

Re: [GENERAL] how to install just client libraries on windows?

2009-12-02 Thread Massa, Harald Armin
Dave, > The closest thing we have to a client installer is probably pgAdmin, > which will install libpq and it's dependencies, as well as psql, > pg_dump/pg_dumpall/pg_restore, and of course, pgAdmin. maybe we should promote this information to the public? Calling "pgAdmin" additionally "the cli

Re: [GENERAL] Postgres Dump out of order

2009-12-02 Thread Craig Ringer
On 2/12/2009 3:41 PM, silly wrote: pg_dump dumps data first and then the constraints (including FK) so there shouldn't be any problems when you import the dump. ... assuming you're using a sufficiently recent version of pg_dump. Wasn't that added fairly recently? -- Craig Ringer -- Sent

Re: [GENERAL] Postgres Dump out of order

2009-12-02 Thread A. Kretschmer
In response to Helio Campos Mello de Andrade : > Hi guys, > >  - I'm having a problem when i want to make a backup of my system. >  - Postgres generated dump was created out of "foreing key" order and when i > try to recreate my database structures, data and functions. Does someone have > this sam

Re: [GENERAL] Storing images in database for web applications

2009-12-02 Thread Jasen Betts
On 2009-11-27, Thom Brown wrote: > --0016e659f44c2bea2504795842a7 > Content-Type: text/plain; charset=ISO-8859-1 > > Hi all, > > I'm wondering if anyone has experience of storing and getting images to and > from a database? We currently have the problem of images being uploaded to > a single gate

[GENERAL] quote string exactly as it is

2009-12-02 Thread dario....@libero.it
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 quote_literal('ss\\\ss'); I get: E'ss\\ss' <-- My string now has E'' added and one backslash has been removed!

Re: [GENERAL] quote string exactly as it is

2009-12-02 Thread Grzegorz Jaśkiewicz
On Wed, Dec 2, 2009 at 12:10 PM, 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 quote_literal('ss\\\ss'); > > I ge

[GENERAL] Auto Vacuum Daemon

2009-12-02 Thread A.Bhattacharya
Hello All, I am using Postgres 8.3.5 on windows and was using manually VACCUM and ANALYZE commands in my scripts but now I have turned on the AutoVaccum daemon by changing the postgresql conf file. Is it fine to do that or should we manually perform vacuum and analyze. Will it automaticall

Re: [GENERAL] quote string exactly as it is

2009-12-02 Thread Merlin Moncure
On Wed, Dec 2, 2009 at 7:10 AM, 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 dollar quote it: select $abc$ss\\\ss$abc$; merlin -- Se

R: Re: [GENERAL] quote string exactly as it is

2009-12-02 Thread dario....@libero.it
Thanks a lot for replies! Dollar quote is what I needed, but I could find it in! Dario >Messaggio originale >Da: mmonc...@gmail.com >Data: 02/12/2009 14.15 >A: "dario@libero.it" >Cc: >Ogg: Re: [GENERAL] quote string exactly as it is > >On Wed, Dec 2, 2009 at 7:10 AM, dario@lib

Re: [GENERAL] Unexpected EOF on client connection

2009-12-02 Thread Howard Cole
Francisco Figueiredo Jr. wrote: Presumably I should never get this error if I use Npgsql? That's correct. But there may be a bug in Npgsql code itself. That's why I asked you to try to raise minpoolvalue to check if you see less errors. I hope it helps. Thanks Francisco - I curren

[GENERAL] Roles with passwords; SET ROLE ... WITH PASSWORD ?

2009-12-02 Thread Craig Ringer
At present, a role may have a password but unless it's a login role the docs say that password doesn't get used. I currently have an app where it'd be handy to be able to: SET ROLE rolename WITH PASSWORD 'blah'; to switch to role `rolename' only if the password `blah' is correct for that r

[GENERAL] Large Objects and Replication question

2009-12-02 Thread Howard Cole
Does anyone know of a replication solution that can handle large objects? Preferrably on a per database rather than per cluster basis. Incidentally - out of interest - why doesn't Slony handle large objects? Thanks. Howard www.selestial.com -- Sent via pgsql-general mailing list (pgsql-genera

[GENERAL] deferrable foreign keys

2009-12-02 Thread Morus Walter
Hi, are there downsides of making foreign keys deferrable (but initially immediate) for updates, when the transaction does not set the constraint behaviour to deferred? I'd expect that to have the same behaviour as non deferrable foreign keys. What I don't understand is, why is non deferrable the

Re: [GENERAL] deferrable foreign keys

2009-12-02 Thread Grzegorz Jaśkiewicz
On Wed, Dec 2, 2009 at 2:29 PM, Morus Walter wrote: > Hi, > > are there downsides of making foreign keys deferrable (but initially > immediate) for updates, when the transaction does not set the > constraint behaviour to deferred? > > I'd expect that to have the same behaviour as non deferrable f

Re: [GENERAL] READ ONLY & I/O ERROR

2009-12-02 Thread Sam Jas
We are getting the below errors after 20 or 25 days of database creation. ERROR: could not open relation 1919829/1152694/1921473: Read-only file system ERROR: could not read block 312320 of relation 1964206/1152694/1981329: Input/output error If we create a new database the problem is repe

Re: [GENERAL] Postgres Dump out of order

2009-12-02 Thread Tom Lane
Craig Ringer writes: > On 2/12/2009 3:41 PM, silly wrote: >> pg_dump dumps data first and then the constraints (including FK) so >> there shouldn't be any problems when you import the dump. > ... assuming you're using a sufficiently recent version of pg_dump. > Wasn't that added fairly recen

Re: [GENERAL] Roles with passwords; SET ROLE ... WITH PASSWORD ?

2009-12-02 Thread Tom Lane
Craig Ringer writes: > Anyway ... I'm curious about whether `SET ROLE rolename WITH PASSWORD' > is something that's technically practical to implement in PostgreSQL and > what people think about the idea. Seems like it would have all the standard problems with cleartext passwords being exposed

Re: [GENERAL] quote string exactly as it is

2009-12-02 Thread Albe Laurenz
dario.ber wrote: > 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 quote_literal('ss\\\ss'); > > I get: > > > E'ss\\ss' <-- My string now has E''

Re: [GENERAL] Large Objects and Replication question

2009-12-02 Thread Alexey Klyukin
On Dec 2, 2009, at 4:23 PM, Howard Cole wrote: > Does anyone know of a replication solution that can handle large objects? > Preferrably on a per database rather than per cluster basis. Take a look at Mammoth Replicator: https://projects.commandprompt.com/public/replicator. Additionally there

Re: [GENERAL] Large Objects and Replication question

2009-12-02 Thread Tatsuo Ishii
> Does anyone know of a replication solution that can handle large > objects? Preferrably on a per database rather than per cluster basis. pgpool-II can handle large objects. However you need to use newer API of libpq to create large objects: Oid lo_create(PGconn *conn, Oid lobjId); I'm not sur

Re: [GENERAL] READ ONLY & I/O ERROR

2009-12-02 Thread Scott Marlowe
(please use text only email to the list) On Wed, Dec 2, 2009 at 7:51 AM, Sam Jas wrote: > > We are getting the below errors after 20 or 25 days of database creation. > > ERROR: could not open relation 1919829/1152694/1921473: Read-only file system > ERROR: could not read block 312320 of relation

Re: [GENERAL] Roles with passwords; SET ROLE ... WITH PASSWORD ?

2009-12-02 Thread Michael Gould
One other topic that is related to this is that we now have a expire date but it would be nice to have a number of days also. This would make it easy to force the user to change their passwords every X days if internal security is being used instead of something like Kerberos or LDAP. Best Regards

Re: [GENERAL] deferrable foreign keys

2009-12-02 Thread Tom Lane
Morus Walter writes: > are there downsides of making foreign keys deferrable (but initially > immediate) for updates, when the transaction does not set the > constraint behaviour to deferred? > I'd expect that to have the same behaviour as non deferrable foreign > keys. > What I don't understand

Re: [GENERAL] Large Objects and Replication question

2009-12-02 Thread Tatsuo Ishii
BTW > Additionally there is a list of available open-source replication solutions > here: > http://wiki.postgresql.org/wiki/Replication%2C_Clustering%2C_and_Connection_Pooling The link http://www.slony2.org/ mentioned in the wiki page above apparently does nothing to do with Slony-II. Can someon

Re: [GENERAL] Large Objects and Replication question

2009-12-02 Thread Alexey Klyukin
On Dec 2, 2009, at 5:48 PM, Tatsuo Ishii wrote: > BTW > >> Additionally there is a list of available open-source replication solutions >> here: >> http://wiki.postgresql.org/wiki/Replication%2C_Clustering%2C_and_Connection_Pooling > > The link http://www.slony2.org/ mentioned in the wiki page

Re: [GENERAL] Books

2009-12-02 Thread Alvaro Herrera
Thomas Løcke escribió: > Would I be supporting the PostgreSQL project by buying these, or are they > just a compilation of the online manuals, done by some random author calling > him-/herself "The PostgreSQL Global Development Group"? :o) If you really want to support the PostgreSQL project, yo

Re: [GENERAL] READ ONLY & I/O ERROR

2009-12-02 Thread Craig Ringer
On 2/12/2009 11:35 PM, Scott Marlowe wrote: (please use text only email to the list) On Wed, Dec 2, 2009 at 7:51 AM, Sam Jas wrote: We are getting the below errors after 20 or 25 days of database creation. ERROR: could not open relation 1919829/1152694/1921473: Read-only file system ERROR: c

Re: [GENERAL] Large Objects and Replication question

2009-12-02 Thread Daniel Verite
Tatsuo Ishii wrote: > However you need to use newer API > of libpq to create large objects: > > Oid lo_create(PGconn *conn, Oid lobjId); [...] > You cannot use old API lo_creat() since it relies on OID, which > pgpool-II does not guarantee OIDs can be replicated. Does it mean that lo_cr

Re: [GENERAL] Roles with passwords; SET ROLE ... WITH PASSWORD ?

2009-12-02 Thread Tom Lane
Michael Gould writes: > One other topic that is related to this is that we now have a expire date > but it would be nice to have a number of days also. This would make it easy > to force the user to change their passwords every X days if internal > security is being used instead of something like

Re: [GENERAL] import data from openoffice Calc

2009-12-02 Thread Le-shin Wu
HI Adrian, Thanks for pointing out the reporting bug information about my problem. I have tried your suggestion and it works great. But this approach can only solve one part of my problem, because I also need to open an existing db table through Clac, edit some tuples, and then save it as a new ta

Re: [GENERAL] Postgres performance on Veritas VxVM

2009-12-02 Thread River Tarnell
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greg Smith: > What you should do is the following: > postgresql.conf: wal_sync_method = open_datasync > /sql/pg_xlog: 'noatime,cio,mincache=direct,convosync=direct > That should work quite well. Thanks. That reduced the import time to about 4hr

pgsql-general@postgresql.org

2009-12-02 Thread Tony Cebzanov
I have a PL/Perl stored procedure that's worked fine on my development boxes but is suddenly failing when installed on a test machine. Both my test machines and the new machine are RHEL AS5. The differences are the test machine is 64-bit, and running Postgres 8.1.18 instead of my development mach

pgsql-general@postgresql.org

2009-12-02 Thread Tony Cebzanov
I have a PL/Perl stored procedure that's worked fine on my development boxes but is suddenly failing when installed on a test machine. Both my test machines and the new machine are RHEL AS5. The differences are the test machine is 64-bit, and running Postgres 8.1.18 instead of my development mach

Re: [GENERAL] Roles with passwords; SET ROLE ... WITH PASSWORD ?

2009-12-02 Thread Craig Ringer
On 2/12/2009 11:04 PM, Tom Lane wrote: Craig Ringer writes: Anyway ... I'm curious about whether `SET ROLE rolename WITH PASSWORD' is something that's technically practical to implement in PostgreSQL and what people think about the idea. Seems like it would have all the standard problems with

pgsql-general@postgresql.org

2009-12-02 Thread Tom Lane
Tony Cebzanov writes: > I have a PL/Perl stored procedure that's worked fine on my development > boxes but is suddenly failing when installed on a test machine. Both my > test machines and the new machine are RHEL AS5. The differences are the > test machine is 64-bit, and running Postgres 8.1.18

Re: [GENERAL] Roles with passwords; SET ROLE ... WITH PASSWORD ?

2009-12-02 Thread Tom Lane
Craig Ringer writes: > On 2/12/2009 11:04 PM, Tom Lane wrote: >> Seems like it would have all the standard problems with cleartext >> passwords being exposed in pg_stat_activity, system logs, etc. > Yeah, I was a bit concerned about that, but it can be worked around with > careful use of paramet

Re: [GENERAL] Build universal binary on Mac OS X 10.6?

2009-12-02 Thread Israel Brewster
On Dec 2, 2009, at 1:03 AM, Dave Page wrote: 2009/12/2 Grzegorz Jaśkiewicz : On Tue, Dec 1, 2009 at 11:43 PM, Israel Brewster > wrote: I am trying to create a static, universal (x86 and ppc at least - 64 bit architectures are optional) build of the PostgreSQL libraries on a Mac OS X 1

[GENERAL] Auto Vaccum

2009-12-02 Thread akp geek
Hi All - how can I find out when the last vaccum run on the databse? Can you please help? regards

Re: [GENERAL] Postgres performance on Veritas VxVM

2009-12-02 Thread Greg Smith
River Tarnell wrote: I'm now running a test using VxFS on SVM soft partitions to see if that improves performance at all (but I'd much rather have the flexibility of VxVM). Flexibility is often expensive from a performance point of view. We regularly tell people here that they have to avoid

Re: [GENERAL] Build universal binary on Mac OS X 10.6?

2009-12-02 Thread Tom Lane
Israel Brewster writes: > That said, I did sort of get this to work. What I ended up doing was > building for each architecture separately (but on the same machine), > then using lipo to combine the resulting libraries. When I took all > but one architecture flag out of the configure string

Re: [GENERAL] return value for PQbinaryTuples

2009-12-02 Thread Daniel Verite
Merlin Moncure wrote: > PQbinaryTuples is basically going to return whatever you passed into > resultformat when you executed the query (in the case of PQexec, it's > going to be 1 always). You mean 0 (i.e. text, not binary). And with an exception on PQexec("FETCH c") when c is a binary

Re: [GENERAL] Auto Vaccum

2009-12-02 Thread Devrim GÜNDÜZ
On Wed, 2009-12-02 at 12:13 -0500, akp geek wrote: > how can I find out when the last vaccum run on the > databse? Check pg_stat_user_tables. -- Devrim GÜNDÜZ, RHCE Command Prompt - http://www.CommandPrompt.com devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr http://www.gundu

Re: [GENERAL] Build universal binary on Mac OS X 10.6?

2009-12-02 Thread Israel Brewster
On Dec 2, 2009, at 8:26 AM, Tom Lane wrote: Israel Brewster writes: That said, I did sort of get this to work. What I ended up doing was building for each architecture separately (but on the same machine), then using lipo to combine the resulting libraries. When I took all but one architectur

Re: [GENERAL] import data from openoffice Calc

2009-12-02 Thread Adrian Klaver
- "Le-shin Wu" wrote: > HI Adrian, > > Thanks for pointing out the reporting bug information about my > problem. I have tried your suggestion and it works great. But this > approach can only solve one part of my problem, because I also need to > open an existing db table through Clac, edit

Re: [GENERAL] Auto Vaccum

2009-12-02 Thread akp geek
thank you 2009/12/2 Devrim GÜNDÜZ > On Wed, 2009-12-02 at 12:13 -0500, akp geek wrote: > > how can I find out when the last vaccum run on the > > databse? > > Check pg_stat_user_tables. > -- > Devrim GÜNDÜZ, RHCE > Command Prompt - http://www.CommandPrompt.com > devrim~gunduz.org, devrim~Postgre

Re: [GENERAL] Postgres performance on Veritas VxVM

2009-12-02 Thread River Tarnell
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Greg Smith: > Flexibility is often expensive from a performance point of view. We > regularly tell people here that they have to avoid using Linux's LVM for > similar reasons--while it shouldn't be so slow, it is. Nothing you can > do about it

Re: [GENERAL] How to get RTREE performance from GIST index?

2009-12-02 Thread Alvaro Herrera
Alban Hertroys wrote: > "In the default PostgreSQL configuration, The Autovacuum Daemon takes > care of automatic analyzing of tables when they are first loaded with > data, and as they change throughout regular operation. When autovacuum > is disabled, it is a good idea to run ANALYZE periodicall

Re: [GENERAL] How to get RTREE performance from GIST index?

2009-12-02 Thread Clive Page
Actually, autovacuum doesn't process temp tables at all because it cannot get to them; they might live solely in the creating process' private memory area. Does that mean that, in between creating a temporary table and actually using it in a complicate query, it is desirable to run an ANALYZE

[GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Kern Sibbald
Hello, I am the project manager of Bacula. One of the database backends that Bacula uses is PostgreSQL. This email is to notify you that a change you made to setting database character codes has created havoc with certain unfortunate Bacula users. Bacula sets the database encoding to SQL_ASCI

[GENERAL] Re: vacuumdb: vacuuming of database "xy" failed: PANIC: corrupted item pointer: 19227

2009-12-02 Thread Tech 2010
On 29 nov., 07:02, Tech 2010 wrote: > What is this? > > PANIC:  corrupted item lengths: total 8192, available space 8068 for the others... find the selected row and replace/delete it -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

[GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Daniel
I have written a C/C++ program that trys to log into a local PostgreSQL database. Here is the code: pg_conn = PQconnectdb( "hostaddr = '127.0.0.1' port = '' dbname = 'TBDB' user = 'sysdba' password = 'stelmo777' connect_timeout = '10'"); if (!pg_conn) { return false; } if (P

[GENERAL] Query using partitioned table hangs

2009-12-02 Thread Rob W
I have an app that was previously using a large unpartitioned table with no problems. I partitioned this table and am now experiencing intermittent hangs when inserting data into the partitioned table. The stored procedure that does the insert seems to run to completion even when it 'hangs'. The

Re: [GENERAL] return value for PQbinaryTuples

2009-12-02 Thread Merlin Moncure
On Wed, Dec 2, 2009 at 12:28 PM, Daniel Verite wrote: >        Merlin Moncure wrote: > >> PQbinaryTuples is basically going to return whatever you passed into >> resultformat when you executed the query (in the case of PQexec, it's >> going to be 1 always). > > You mean 0 (i.e. text, not binary).

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Tom Lane
Kern Sibbald writes: > Bacula sets the database encoding to SQL_ASCII, because although > Bacula "supports" UTF-8 character encoding, it cannot enforce it. Okay ... > CREATE DATABASE bacula ENCODING 'SQL_ASCII'; > > However, with PostgreSQL 8.4, the above command is ignored because the > defau

Re: [GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Tom Lane
Daniel writes: > I have written a C/C++ program that trys to log into a local > PostgreSQL database. Here is the code: > pg_conn = PQconnectdb( > "hostaddr = '127.0.0.1' port = '' dbname = 'TBDB' user = 'sysdba' > password = 'stelmo777' connect_timeout = '10'"); > if (!pg_conn) > { >

Re: [GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Pedro Doria Meunier
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Did you check you pg_hba.conf ? another thing: although port defaults to 5432 you *should* specify that in the connection string. also... is "sysdba" *really* an authorized user? check your permissions... BR, Pedro. On 12/02/2009 09:42 PM, Tom Lane w

Re: [GENERAL] use log_statement to log only SELECTs?

2009-12-02 Thread Brian Witt
On Sun, 2009-11-29 at 06:00 -0500, Bruce Momjian wrote: > Brian Witt wrote: > > I've been looking for a way to use log_statement to log only select > > statements; is this possible? (I'm using PostgreSQL 8.1.18) > No, log_statement doesn't allow do that, and I can't think of another > option. T

Re: [GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Daniel Verite
Daniel wrote: > I have written a C/C++ program that trys to log into a local > PostgreSQL database. Here is the code: > > pg_conn = PQconnectdb( > "hostaddr = '127.0.0.1' port = '' dbname = 'TBDB' user = 'sysdba' > password = 'stelmo777' connect_timeout = '10'"); > if (!pg_conn)

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Adrian Klaver
On Wednesday 02 December 2009 5:18:52 am Kern Sibbald wrote: > Hello, > > I am the project manager of Bacula. One of the database backends that > Bacula uses is PostgreSQL. > > This email is to notify you that a change you made to setting database > character codes has created havoc with certain u

[GENERAL] How to auto-increment?

2009-12-02 Thread Andre Lopes
Hi, I have a table like this: id_product id_increment and I need to increment values in id_increment like this prod_1 1 prod_1 2 prod_1 3 prod_2 1 Wich is the best way to do this? Using a trigger? Where can I find examples of plpgsql doing this? Best Regards, André. Sorry for my bad engli

Re: [GENERAL] How to auto-increment?

2009-12-02 Thread Greg Williamson
See the data type "SERIAL" in the PostgreSQL manual for whatever flavor of the database you are using ... Apologies for top-posting -- challenged mail client. HTH, Greg W. From: Andre Lopes To: pgsql-general@postgresql.org Sent: Wed, December 2, 2009 2:52:5

Re: [GENERAL] How to auto-increment?

2009-12-02 Thread John R Pierce
Andre Lopes wrote: Hi, I have a table like this: id_product id_increment and I need to increment values in id_increment like this prod_1 1 prod_1 2 prod_1 3 prod_2 1 Wich is the best way to do this? Using a trigger? Where can I find examples of plpgsql doing this? offhand,

Re: [GENERAL] How to get RTREE performance from GIST index?

2009-12-02 Thread Alban Hertroys
On 2 Dec 2009, at 21:12, Clive Page wrote: >> Actually, autovacuum doesn't process temp tables at all because it >> cannot get to them; they might live solely in the creating process' >> private memory area. > > Does that mean that, in between creating a temporary table and actually using > it in

Re: [GENERAL] Auto Vacuum Daemon

2009-12-02 Thread Rikard Bosnjakovic
On Wed, Dec 2, 2009 at 13:46, wrote: > Is it fine to do that or should we manually perform vacuum and analyze. > > Will it automatically take care of vacuuming the tables and analyzing them? Have a look at this wiki-page that was posted by Craig on this list a few days ago: http://wiki.postgre

Re: [GENERAL] Auto Vacuum Daemon

2009-12-02 Thread Scott Marlowe
On Wed, Dec 2, 2009 at 5:46 AM, wrote: > Hello All, > > I am using Postgres 8.3.5 on windows and was using manually VACCUM and > ANALYZE commands in my scripts but now I have turned on the AutoVaccum > daemon by changing the postgresql conf file. > > Is it fine to do that or should we manually pe

[GENERAL] using querys like: 'select table.*'

2009-12-02 Thread erobles
Hi! In  postgresql 7.2  i can use  this kind of querys: select  table.* ; select  * from  table1 where  table1.key=othertable.key; but in  postgresql 8.3  i have  an error like this: ERROR: missing FROM-clause entry for table ... what should i do to solve this?  :-)

Re: [GENERAL] using querys like: 'select table.*'

2009-12-02 Thread erobles
erobles wrote: Hi! In postgresql 7.2 i can use this kind of querys: select table.* ; select * from table1 where table1.key=othertable.key; but in postgresql 8.3 i have an error like this: ERROR: missing FROM-clause entry for table ... what should i do to solve this? :-)

Re: [GENERAL] use log_statement to log only SELECTs?

2009-12-02 Thread Greg Smith
Brian Witt wrote: Thanks for the response. I was afraid of that. Can I make this a feature request? How do I do that? Should I add it to this page: http://wiki.postgresql.org/wiki/Todo Generally it's better to see if there's at least some general support for an idea before adding it to t

Re: [GENERAL] using querys like: 'select table.*'

2009-12-02 Thread Adrian Klaver
On Wednesday 02 December 2009 4:04:47 pm erobles wrote: > erobles wrote: > > Hi! > > > > In postgresql 7.2 i can use this kind of querys: > > > > select table.* ; > > > > select * from table1 where table1.key=othertable.key; > > > > > > but in postgresql 8.3 i have an error like this: > >

Re: [GENERAL] Large Objects and Replication question

2009-12-02 Thread Tatsuo Ishii
> > However you need to use newer API > > of libpq to create large objects: > > > > Oid lo_create(PGconn *conn, Oid lobjId); > [...] > > You cannot use old API lo_creat() since it relies on OID, which > > pgpool-II does not guarantee OIDs can be replicated. > > Does it mean that lo_create(conn,

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] Build universal binary on Mac OS X 10.6?

2009-12-02 Thread Tom Lane
Israel Brewster writes: > Well, I'm not trying to use the server or client programs from this > build - I just want the universal libraries for my programs. My point > in this last section, however, doesn't necessarily extend as far as > actual function, but rather is just with the build. My

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Craig Ringer
On 2/12/2009 9:18 PM, Kern Sibbald wrote: Hello, I am the project manager of Bacula. One of the database backends that Bacula uses is PostgreSQL. As a Bacula user (though I'm not on the Bacula lists), first - thanks for all your work. It's practically eliminated all human intervention from

Re: [GENERAL] Auto Vacuum Daemon

2009-12-02 Thread Craig Ringer
On 3/12/2009 7:24 AM, Rikard Bosnjakovic wrote: On Wed, Dec 2, 2009 at 13:46, wrote: Is it fine to do that or should we manually perform vacuum and analyze. Will it automatically take care of vacuuming the tables and analyzing them? Have a look at this wiki-page that was posted by Craig on

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Tom Lane
Craig Ringer writes: > It's a pity that attempting to specify an encoding other than the safe > one when using a non-template0 database doesn't cause the CREATE > DATABASE command to fail with an error. Huh? regression=# create database foo lc_ctype = 'en_US.utf8' encoding = 'latin1'; ERROR:

Re: [GENERAL] using querys like: 'select table.*'

2009-12-02 Thread Craig Ringer
On 3/12/2009 7:58 AM, erobles wrote: Hi! In postgresql 7.2 i can use this kind of querys: select table.* ; select * from table1 where table1.key=othertable.key; but in postgresql 8.3 i have an error like this: ERROR: missing FROM-clause entry for table ... what should i do to solve this? :

Re: [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Craig Ringer
On 3/12/2009 11:03 AM, Tom Lane wrote: Craig Ringer writes: It's a pity that attempting to specify an encoding other than the safe one when using a non-template0 database doesn't cause the CREATE DATABASE command to fail with an error. Huh? regression=# create database foo lc_ctype = 'en_US.

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Craig Ringer
On 3/12/2009 11:09 AM, Jerome Alet wrote: On Thu, Dec 03, 2009 at 10:54:07AM +0800, Craig Ringer wrote: Anyway, it'd be nice if Bacula would convert file names to utf-8 at the file daemon, using the encoding of the client, for storage in a utf-8 database. +1 for me. this is the way to go. I

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Stephen Frost
* Craig Ringer (cr...@postnewspapers.com.au) wrote: > ... so it's defaulting to SQL_ASCII, but actually supports utf-8 if your > systems are all in a utf-8 locale. Assuming there's some way for the > filed to find out the encoding of the director's database, it probably > wouldn't be too tric

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Jerome Alet
On Thu, Dec 03, 2009 at 10:54:07AM +0800, Craig Ringer wrote: > > Anyway, it'd be nice if Bacula would convert file names to utf-8 at the > file daemon, using the encoding of the client, for storage in a utf-8 > database. +1 for me. this is the way to go. I understand people with an existing bac

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Jose Ildefonso Camargo Tolosa
Hi! On Thu, Dec 3, 2009 at 10:39 PM, Jerome Alet wrote: > On Thu, Dec 03, 2009 at 10:54:07AM +0800, Craig Ringer wrote: >> >> Anyway, it'd be nice if Bacula would convert file names to utf-8 at the >> file daemon, using the encoding of the client, for storage in a utf-8 >> database. > > +1 for me

Re: [GENERAL] [Bacula-devel] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Gary R. Schmidt
On Thu, December 3, 2009 00:18, Kern Sibbald wrote: [SNIP change in Postgres defaults.] Bloody typical, after the recent bollocking of MySQL, I was thinking, "Maybe I should switch over to postgres?" Hmm, I think I've got some spare Oracle or DB2 licenses floating around... Now, do I *have* the

[GENERAL] Strange. I can logon with an invalid or no password atall

2009-12-02 Thread Daniel
My program is reporting "Logged on." even if I enter an invalid or no password atall. Here is my login function and below is the function that calls it: bool DBConn::Connect(const std::string &host, const std::string &user, const std::string &pass) // Connects to the database { std::string cs

Re: [GENERAL] Cannot login, with C/C++ program

2009-12-02 Thread Daniel
Oops, as it happens I had an error in my program logic and pg_conn was actually true. -- 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] Strange. I can logon with an invalid or no password atall

2009-12-02 Thread Tom Lane
Daniel writes: > My program is reporting "Logged on." even if I enter an invalid or no > password atall. You sure the server is configured to ask for a password? http://www.postgresql.org/docs/8.4/static/client-authentication.html regards, tom lane -- Sent via pgsql-ge

Re: [GENERAL] Strange. I can logon with an invalid or no password atall

2009-12-02 Thread Chris
void TBClientFrame::Login(const wxString &user, const wxString &pass) { std::string host("127.0.0.1"); std::string user_str = std::string(user.mb_str(*wxConvCurrent)); std::string pass_str = std::string(pass.mb_str(*wxConvCurrent)); if (db_conn.Connect(host, user_str, pass_str)) wxMe

Re: [Bacula-users] [GENERAL] Catastrophic changes to PostgreSQL 8.4

2009-12-02 Thread Craig Ringer
Stephen Frost wrote: > * Craig Ringer (cr...@postnewspapers.com.au) wrote: >> ... so it's defaulting to SQL_ASCII, but actually supports utf-8 if your >> systems are all in a utf-8 locale. Assuming there's some way for the >> filed to find out the encoding of the director's database, it probabl

Re: [GENERAL] How to auto-increment?

2009-12-02 Thread A. Kretschmer
In response to Andre Lopes : > Hi, >   > I have a table like this: >   > id_product > id_increment >   > and I need to increment values in id_increment like this >   > prod_1 > 1 >   > prod_1 > 2 >   > prod_1 > 3 >   > prod_2 > 1 >   Ahh, you want to count per group, yes? Do you have 8.4? If yes,

Re: [GENERAL] deferrable foreign keys

2009-12-02 Thread Morus Walter
Hallo Tom, > Morus Walter writes: > > are there downsides of making foreign keys deferrable (but initially > > immediate) for updates, when the transaction does not set the > > constraint behaviour to deferred? > > > I'd expect that to have the same behaviour as non deferrable foreign > > keys.