Re: [GENERAL] Postgres Cookbook

2009-03-06 Thread Artacus
Stefan Kaltenbrunner wrote: Tino Wildenhain wrote: Greg Smith wrote: On Wed, 4 Mar 2009, Artacus wrote: So it looks like at one time we had a cookbook. But the links are dead now. I'm not sure why Roberto Mello stopped hosting that, but you can see the last content posted there at http://

Re: [GENERAL] Using PostgreSQL 32bit dlls in 64-bit code?

2009-03-06 Thread John R Pierce
se.step...@gmail.com wrote: Hi, We are considering to use postgreSQL for our 64-bit code development for Windows XP 64 bit machine. As 64-bit postgreSQL is not available for Windows, we can only use postgreSQL's 32bit dlls. In that case, can we just call postgreSQL's functions in our 64-bit co

Re: [GENERAL] mdf

2009-03-06 Thread John R Pierce
Steve Crawford wrote: Ary Pezo Silvano wrote: hi, how can i import a mdf database into postgres? best, ary Using Access to export or connect via ODBC is probably the safest bet. Access natively uses JET databases, which are .MDB not .MDF ... MDF is SQL Server's native format. not at

[GENERAL] Using PostgreSQL 32bit dlls in 64-bit code?

2009-03-06 Thread se . stephen
Hi, We are considering to use postgreSQL for our 64-bit code development for Windows XP 64 bit machine. As 64-bit postgreSQL is not available for Windows, we can only use postgreSQL's 32bit dlls. In that case, can we just call postgreSQL's functions in our 64-bit code? Or do we need to write a

Re: [GENERAL] mdf

2009-03-06 Thread Steve Crawford
Ary Pezo Silvano wrote: hi, how can i import a mdf database into postgres? best, ary Using Access to export or connect via ODBC is probably the safest bet. If you don't have Access It's listed as "alpha" software, has no "home" page on Sourceforge and looks to have been abandoned ha

Re: [GENERAL] mdf

2009-03-06 Thread John R Pierce
Ary Pezo Silvano wrote: hi, how can i import a mdf database into postgres? do you have access to the SQL Server that this MDF file came from? Install the Postgres client for windows, along with a Postgres ODBC driver on that server, and use the Data Translation Services in SQL Server E

[GENERAL] mdf

2009-03-06 Thread Ary Pezo Silvano
hi, how can i import a mdf database into postgres? best, ary

Re: [GENERAL] Log SQL code before executing it

2009-03-06 Thread hubert depesz lubaczewski
On Fri, Mar 06, 2009 at 11:24:16PM +0100, Alexander Farber wrote: > is there please a way to display the executed SQL code? log_statement in postgresql.conf depesz -- Linkedin: http://www.linkedin.com/in/depesz / blog: http://www.depesz.com/ jid/gtalk: dep...@depesz.com / aim:depeszhdl / skyp

Re: [GENERAL] Maximum transaction rate

2009-03-06 Thread Greg Smith
On Fri, 6 Mar 2009, Ben Chobot wrote: How does turning off write caching on the disk stop the problem with LVM? It doesn't. Linux LVM is awful and broken, I was just suggesting more details on what you still need to check even when it's not involved. -- * Greg Smith gsm...@gregsmith.com ht

[GENERAL] Log SQL code before executing it

2009-03-06 Thread Alexander Farber
Dear PgSQL users, is there please a way to display the executed SQL code? I'm using phpBB 3.0.4 / PostgreSQL 8.2.6 / PHP 5.2.5 / OpenBSD 4.3 to develop a card game in Flash / C / Perl (at http://preferans.de ) and would like to log each game round by simply posting and replying in one of the phpB

Re: [GENERAL] iSCSI SAN Suggestions

2009-03-06 Thread Scott Marlowe
On Fri, Mar 6, 2009 at 6:47 AM, Aaron wrote: > We are facing an immediate need to refresh and expand some of our > iSCSI storage we are running our PostgreSQL instance on.  I am open to > just about anything but I wondered if this group would have any > suggestions.  One item that is a bit unique

Re: [GENERAL] Maximum transaction rate

2009-03-06 Thread Scott Marlowe
On Fri, Mar 6, 2009 at 2:22 PM, Ben Chobot wrote: > On Fri, 6 Mar 2009, Greg Smith wrote: > >> On Fri, 6 Mar 2009, Tom Lane wrote: >> >>>  Otherwise you need to reconfigure your drive to not cache writes. >>>  I forget the incantation for that but it's in the PG list archives. >> >> There's a dicu

Re: [GENERAL] Maximum transaction rate

2009-03-06 Thread Ben Chobot
On Fri, 6 Mar 2009, Greg Smith wrote: On Fri, 6 Mar 2009, Tom Lane wrote: Otherwise you need to reconfigure your drive to not cache writes. I forget the incantation for that but it's in the PG list archives. There's a dicussion of this in the docs now, http://www.postgresql.org/docs/8.3/i

Re: [GENERAL] set-valued function called in context that cannot accept a set

2009-03-06 Thread Eric B. Ridge
On Mar 6, 2009, at 3:49 PM, hubert depesz lubaczewski wrote: On Fri, Mar 06, 2009 at 03:33:30PM -0500, Eric B. Ridge wrote: So my question is really, what's the difference and why doesn't this work with PL/PGSQL functions? because it is long-time limitation of setof-returning plplsql functi

Re: [GENERAL] set-valued function called in context that cannot accept a set

2009-03-06 Thread hubert depesz lubaczewski
On Fri, Mar 06, 2009 at 03:33:30PM -0500, Eric B. Ridge wrote: > So my question is really, what's the difference and why doesn't this > work with PL/PGSQL functions? because it is long-time limitation of setof-returning plplsql functions (i think all pl/*). it is removed in 8.4 http://www.depesz

Re: [GENERAL] set-valued function called in context that cannot accept a set

2009-03-06 Thread Eric B. Ridge
On Mar 6, 2009, at 3:27 PM, Raymond O'Donnell wrote: When a function returns SETOF something, you need to treat it as if it were a table, thus: select * from unnest2(...); Except that isn't true if the function is written in C. CREATE OR REPLACE FUNCTION unnest(anyarray) RETURNS SETOF anye

Re: [GENERAL] set-valued function called in context that cannot accept a set

2009-03-06 Thread Raymond O'Donnell
On 06/03/2009 19:53, Eric B. Ridge wrote: > # select unnest2(ARRAY[1,2,3]), 'hi'; > ERROR: set-valued function called in context that cannot accept a set > CONTEXT: PL/pgSQL function "unnest2" line 8 at return next When a function returns SETOF something, you need to treat it as if it were a tab

[GENERAL] set-valued function called in context that cannot accept a set

2009-03-06 Thread Eric B. Ridge
This is using PG v8.1. I have a "table function" in C called "unnest". It takes "anyarray" as its only argument and returns a set of "anyelement". It's a handy little function for turning arrays into sets. You can use it in two different ways: SELECT * FROM unnest(ARRAY[1,2,3]); o

Re: [GENERAL] Maximum transaction rate

2009-03-06 Thread Greg Smith
On Fri, 6 Mar 2009, Tom Lane wrote: Otherwise you need to reconfigure your drive to not cache writes. I forget the incantation for that but it's in the PG list archives. There's a dicussion of this in the docs now, http://www.postgresql.org/docs/8.3/interactive/wal-reliability.html hdparm -

Re: [GENERAL] Maximum transaction rate

2009-03-06 Thread Tom Lane
Jack Orenstein writes: > The transaction rates I'm getting seem way too high: 2800-2900 with > one thread, 5000-7000 with ten threads. I'm guessing that writes > aren't really reaching the disk. Can someone suggest how to figure out > where, below postgres, someone is lying about writes reaching t

Re: [GENERAL] pgsql announce now on twitter

2009-03-06 Thread Douglas J Hunley
On Thursday 05 March 2009 21:15:08 Mark Styles wrote: > BTW, Identica has group support, and I created a postgres group a while > ago. You can join it here: > > http://identi.ca/group/postgres Joined -- Douglas J Hunley (doug at hunley.homeip.net) -- Sent via pgsql-general mailing list (pgsql-

Re: [GENERAL] Installing a module for PostgreSQL

2009-03-06 Thread Tom Lane
Thom Brown writes: > Wow, is that it? I didn't realise it was that simple. Shouldn't something > like this be mentioned in the modules section of the documentation? It's > just that it wasn't obvious what constituted a module. There is documentation here: http://www.postgresql.org/docs/8.3/sta

[GENERAL] Maximum transaction rate

2009-03-06 Thread Jack Orenstein
I'm using postgresql 8.3.6 through JDBC, and trying to measure the maximum transaction rate on a given Linux box. I wrote a test program that: - Creates a table with two int columns and no indexes, - loads the table through a configurable number of threads, with each transaction writing one r

Re: [GENERAL] Postgres with phpScheduleIt

2009-03-06 Thread Scot Kreienkamp
I did get it working with 8.3, but it took some time and several posts to the forums there. The changes were fairly minor on the phpscheduleit side to make it work. They were specific to differences between mysql and Postgres; there weren't any changes that were Postgres version specific. It doe

Re: [GENERAL] Installing a module for PostgreSQL

2009-03-06 Thread Thom Brown
> > > test=*# \i /usr/share/postgresql/8.3/contrib/uuid-ossp.sql > SET > Zeit: 0,122 ms > CREATE FUNCTION > Zeit: 135,669 ms > CREATE FUNCTION > Zeit: 0,367 ms > CREATE FUNCTION > Zeit: 0,278 ms > CREATE FUNCTION > Zeit: 0,276 ms > CREATE FUNCTION > Zeit: 0,274 ms > CREATE FUNCTION > Zeit: 0,291 ms

Re: [GENERAL] After Upgrade from 8.2.6 to 8.3.6: function to_timestamp does not exist

2009-03-06 Thread Tom Lane
Scott Marlowe writes: > The functionality is the same, since the now() will get rounded down > to the date with time of 00:00:00. So, anytime for that day will be >> = to the output of date_trunc('day',now()) Yeah. So actually it's sufficient to do a.from_datetime >= current_date and a

Re: [GENERAL] Performance of subselects

2009-03-06 Thread Tom Lane
=?ISO-8859-1?Q?Christian_Schr=F6der?= writes: > if I want to find all records from a table that don't have a matching > record in another table there are at least two ways to do it: Using a > left outer join or using a subselect. I always thought that the planner > would create identical plans

Re: [GENERAL] Installing a module for PostgreSQL

2009-03-06 Thread A. Kretschmer
In response to Thom Brown : > Hi, > > This may be a stupid question, but I can't find any guide in the documentation > which tells me the answer.  How do I install a module for PostgreSQL in > Linux?  > For example, how would I install uuid-ossp?  I can't find any options in > postgresql.conf whi

[GENERAL] Installing a module for PostgreSQL

2009-03-06 Thread Thom Brown
Hi, This may be a stupid question, but I can't find any guide in the documentation which tells me the answer. How do I install a module for PostgreSQL in Linux? For example, how would I install uuid-ossp? I can't find any options in postgresql.conf which would enable a module. Is this an optio

Re: [GENERAL] Custom datestyle for timestamps

2009-03-06 Thread Tom Lane
"Daniel Verite" writes: > I think it would valuable to have at least a default format that > doesn't include the sub-second precision, since it typically adds 7 > characters that enlarge output columns in a way that is generally > useless to the human eyes. Do other users agree with that? If y

[GENERAL] iSCSI SAN Suggestions

2009-03-06 Thread Aaron
We are facing an immediate need to refresh and expand some of our iSCSI storage we are running our PostgreSQL instance on. I am open to just about anything but I wondered if this group would have any suggestions. One item that is a bit unique to our situation, I am not in the need of staggering p

Re: [GENERAL] Posts not showing

2009-03-06 Thread Richard Huxton
Oluwatope Akinniyi wrote: > Hi, > > I wonder why my posts from db.subscripti...@shepherdhill.biz is no > longer showing. I had to subscribe with my hotmail again in order to > be able to reach the list. I had unsubscribed and subscribed again > with nothing has changed. I also mailedpgsql-gene...@

Re: [GENERAL] Custom datestyle for timestamps

2009-03-06 Thread Daniel Verite
Peter Eisentraut wrote: On Thursday 05 March 2009 00:19:02 Daniel Verite wrote: > SET DATESTYLE takes predefined keywords such as ISO or US as arguments, > but I can't find a way to specify a custom format string for > timestamps. There is no support for that. > What I'd like to fin

Re: [GENERAL] What is the difference?

2009-03-06 Thread Ivan Sergio Borgonovo
On Fri, 6 Mar 2009 09:50:27 +0100 Oluwatope Akinniyi wrote: > > This > SELECT 1 WHERE '95b5a221aeba15c' IN (E'\'' || > replace('95b5a221aeba15c+fb4e7219ab898ce+b08586cb81059f9','+',''',''') > || E'\'') returns no row while > > SELECT 1 WHERE '95b5a221aeba15c' IN > ('95b5a221aeba15c','fb4e7219a

[GENERAL] Posts not showing

2009-03-06 Thread Oluwatope Akinniyi
Hi, I wonder why my posts from db.subscripti...@shepherdhill.biz is no longer showing. I had to subscribe with my hotmail again in order to be able to reach the list. I had unsubscribed and subscribed again with nothing has changed. I also mailedpgsql-gene...@postgresql.org but not response.

Re: [GENERAL] What is the difference?

2009-03-06 Thread Richard Huxton
Oluwatope Akinniyi wrote: > This > SELECT 1 WHERE '95b5a221aeba15c' IN (E'\'' || > replace('95b5a221aeba15c+fb4e7219ab898ce+b08586cb81059f9','+',''',''') || > E'\'') returns no row while This returns a string with text '95b...', '...', '...' > SELECT 1 WHERE '95b5a221aeba15c' IN > ('95b5a221a

[GENERAL] What is the difference?

2009-03-06 Thread Oluwatope Akinniyi
This SELECT 1 WHERE '95b5a221aeba15c' IN (E'\'' || replace('95b5a221aeba15c+fb4e7219ab898ce+b08586cb81059f9','+',''',''') || E'\'') returns no row while SELECT 1 WHERE '95b5a221aeba15c' IN ('95b5a221aeba15c','fb4e7219ab898ce','b08586cb81059f9') returns a row. What is the difference between E