Re: [GENERAL] Inserting Data

2006-08-25 Thread Michael Fuhr
On Thu, Aug 24, 2006 at 09:20:11AM -0700, Bob Pawley wrote: > In attempting to use the IF expression (below) I receive an error > message stating the return includes two or more rows. This seems > to make sense since I am asking if one condition exists > (p_id device_number = library device_number

Re: [GENERAL] Saving a jpg into Postgresql table

2006-08-25 Thread Kaloyan Iliev
Gibson wrote: Hi guys, I have a projects using ASP.NET (VB.net) where i upload a jpeg file using a web form and then save the jpeg file into a table. I've decided to use "Oid" instead of "Bytea" as i heard that "Oid" is more memory efficient. So can anyone point me to a website or link where

Re: [GENERAL] multimpe records output from a 'no-table' source

2006-08-25 Thread Rafal Pietrak
On Fri, 2006-08-25 at 08:02 +0200, Martijn van Oosterhout wrote: > For the rest of your question, see generate_series(); > > http://www.postgresql.org/docs/8.1/static/functions-srf.html Thenx, That's exactly what I've needed! -- -R ---(end of broadcast)-

[GENERAL] HOW SELECT

2006-08-25 Thread shyju c.k
hai all       i have table  ,as follows   -- |id_int  |vid_int |name_chv  |   address_txt  | --

[GENERAL] Can I read data load files without loading in db?

2006-08-25 Thread barryc . ctr
We have an awkward situation. An affiliate organization periodically sends us a stack of CDs. On the first one there are a couple of small scripts to handle installing the data and/or upgrading the database schema. Most of the CD's contents are large data files to be used to update a postgre

[GENERAL] PG8 Stalling/Not Exit/Not Performing Issue

2006-08-25 Thread JamieD
Hi Everyone, I have come across a very sticky situation which is very concerning, and frustrating. The server we run - AMD Opteron, 2GB RAM, 2x CPU's, runs Postgres, Apache and PHP to run our web applications. Last week I upgraded from Postgres 7.4.2 to Postgres 8 and have been running beutifully

[GENERAL] Help needed defining timestamp format for input?

2006-08-25 Thread Brent Wood
Hi, I've been given a dataset (from Sybase) which has the timestamps expressed as "Jun 26 2002 12:18:56:903PM" I'd like to use copy in Postgres to load these data, but can't see in the (v8.1) docs how to specify this format for Postgresql. Can anyone help with this? Thanks, Brent Wood

[GENERAL] ruby driver postgresql

2006-08-25 Thread Junkone
HI I am using the C driver and am trying to run this statement irb(main):020:0> a=conn.exec("select * from exchanges where id=$1",4) ArgumentError: wrong number of arguments (2 for 1) from (irb):20:in `exec' from (irb):20 from :0 irb(main):021:0> I get the error. But the ru

[GENERAL] preload perl modules in plperl?

2006-08-25 Thread David Garamond
How do I "preload" perl modules so they are available in trusted pl/perl? The modules I want to use are not dangerous, they are typically utility routines like HTML::Entities, URI::Escape, and the like. Do I have to resort to plperlu for this and invoke "use HTML::Entities;" directly in the pl func

Re: [GENERAL] HOW SELECT

2006-08-25 Thread Ragnar
On fös, 2006-08-25 at 13:20 +0530, shyju c.k wrote: > hai all > > > i have table ,as follows [reformatted] > id_int | vid_int | name_chv | address_txt > 2 | 12 | ram| address1 > 3 | 12 | joy| address2 > 4 | 14 | shyju | address3 > 5

Re: [GENERAL] [ADMIN] CMS - portal server Question

2006-08-25 Thread Jean-Paul Argudo
Hi, Another good CMS, IMHO, is drupal (http://drupal.org/). It works well with PostgreSQL, and we use it successfully at http://www.PostgreSQLFr.org/. It's stable and maintained, the dev team releases new versions often, and there are a lot of pluggable modules ( http://drupal.org/project/Module

Re: [GENERAL] Can I read data load files without loading in db?

2006-08-25 Thread Martijn van Oosterhout
On Wed, Aug 23, 2006 at 12:27:09PM -0700, [EMAIL PROTECTED] wrote: > We have an awkward situation. > > An affiliate organization periodically sends us a stack of CDs. On > the first one there are a couple of small scripts to handle installing > the data and/or upgrading the database schema.

[GENERAL] CMS - portal server Question

2006-08-25 Thread Achilleas Mantzios
Hi, i am thinking of deploying a CMS system for our corporate web server. I have seen/installed/tested : Jboss Portal : Seeems good and standards complying but too unstable Apache Lenya : Very unstable - could not get it to any useful work Php-nuke     : (despite our favor towards java, this seem

Re: [GENERAL] CMS - portal server Question

2006-08-25 Thread Sergiusz Jarczyk
Hi Achilleas Achilleas Mantzios wrote: Hi, i am thinking of deploying a CMS system for our corporate web server. I have seen/installed/tested : Jboss Portal : Seeems good and standards complying but too unstable Apache Lenya : Very unstable - could not get it to any useful work Php-nuke :

Re: [GENERAL] CMS - portal server Question

2006-08-25 Thread Andrew Kelly
On Fri, 2006-08-25 at 12:07 +0300, Achilleas Mantzios wrote: > In the same sense java is prefered over PHP, since we dont intent to interfere > with CMS code, but if some killer PHP app does the job, then it will be the > one selected. Take a look at eZpublish (http://ez.no). Killer PHP app, s

Re: [GENERAL] [ADMIN] CMS - portal server Question

2006-08-25 Thread Mark Matthews
On 25/08/2006, at 7:07 PM, Achilleas Mantzios wrote: Hi, i am thinking of deploying a CMS system for our corporate web server. I have seen/installed/tested : Jboss Portal : Seeems good and standards complying but too unstable Apache Lenya : Very unstable - could not get it to any useful work

Re: [GENERAL] invalid byte sequence ?

2006-08-25 Thread Peter Eisentraut
Am Donnerstag, 24. August 2006 23:22 schrieb Karsten Hilbert: > In that case I would suggest to also emit a suitable warning > (with a postgresql.conf option to switch that off which > defaults to ON). libpq can neither read postgresql.conf nor does it have the liberty to write messages anywhere.

Re: [GENERAL] Can I read data load files without loading in db?

2006-08-25 Thread Martijn van Oosterhout
On Fri, Aug 25, 2006 at 07:36:38AM -0400, barry conner wrote: > Thanks for your reply Martijn. > I do not know for certain that its in pg_dump format, not having dealt > with it specificly before. I will examine the files more closely to look > for COPY statements. If not in that format, what

Re: [GENERAL] [ADMIN] CMS - portal server Question

2006-08-25 Thread Bradley Kieser
I think that PHP will be were you are at. The Java route in the WEB world is just too much code for too little benefit. It's fine for big apps, but frankly, for web environments it's very top-heavy. Modern scripting languages walk all over it. And yes, I do actually love working in Java, I am v

Re: [GENERAL] invalid byte sequence ?

2006-08-25 Thread Karsten Hilbert
On Fri, Aug 25, 2006 at 01:53:30PM +0200, Peter Eisentraut wrote: > > In that case I would suggest to also emit a suitable warning > > (with a postgresql.conf option to switch that off which > > defaults to ON). > > libpq can neither read postgresql.conf nor does it have the liberty to write > m

Re: [GENERAL] [ADMIN] CMS - portal server Question

2006-08-25 Thread Joe Audette
PHP and Java are not the only options. My project, mojoPortal, is written in C# and runs under .NET on windows or Mono on nix It works with PostgreSQL or MySQL (or MS SQL or SQLite) Worth a look: http://www.mojoportal.com joe_audette [at] yahoo dotcom http://www.joeaudette.com http://

Re: [GENERAL] Can I read data load files without loading in db?

2006-08-25 Thread Peter Eisentraut
Am Freitag, 25. August 2006 13:51 schrieb Martijn van Oosterhout: > It really depends on the format they send you. It's either plain text, > in which case the COPY commands will tell you which fields. If it's the > custom format you can use tar to extract it IIRC. You can also use pg_restore to ex

[GENERAL] 7.4 - data recovery

2006-08-25 Thread Bartosz Belter
Hi, I'm not postgresql experienced user, so please forgive me, if I missed something obvious! ;-) I have the following problem: 1. Partition with postgresql v.7.4 data has been damaged 2. No backups! 3. I've recovered some files and it looks to me they're from $PGDATA/base/data/xxx (it loo

Re: [GENERAL] Help needed defining timestamp format for input?

2006-08-25 Thread Tom Lane
Brent Wood <[EMAIL PROTECTED]> writes: > I've been given a dataset (from Sybase) which has the timestamps > expressed as > "Jun 26 2002 12:18:56:903PM" That's pretty bizarre. My advice is to run a quick perl or sed script over the data and change the (I assume) fractional seconds delimiter to a

Re: [GENERAL] ruby driver postgresql

2006-08-25 Thread Michael Fuhr
On Thu, Aug 24, 2006 at 12:11:28PM -0700, Junkone wrote: > I am using the C driver and am trying to run this statement > irb(main):020:0> a=conn.exec("select * from exchanges where id=$1",4) > ArgumentError: wrong number of arguments (2 for 1) > from (irb):20:in `exec' > from (irb):

Re: [GENERAL] SQL:2003 Window Functions for postgresql 8.3?

2006-08-25 Thread Gregory Stark
Tom Lane <[EMAIL PROTECTED]> writes: > Martijn van Oosterhout writes: > > The main thing I want to use them for is for cumulative output. > > ... > > With window functions you define for each row a "window" which is from > > the beginning of the table to that row and then sum the values, for > >

Re: [GENERAL] FW: Serverlog 100GB

2006-08-25 Thread Randy How
Thanks Tom, http://www.postgresql.org/docs/8.1/interactive/logfile-maintenance.html I'll go over this documentation. Thanks again Randy -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Lane Sent: Thursday, August 24, 2006 10:37 PM To: Randy How Cc:

[GENERAL] getting on the system

2006-08-25 Thread epost2
Hi! I could use some help getting started with Postgresq!. The problem is that although things worked fine yesterday, now I`m getting permission denied - could not connect error. System is windows xp. I wonder if this is related to the setup regarding user accounts, when I installed pgsql, the pro

[GENERAL] Inserting Data

2006-08-25 Thread Bob Pawley
Michael   OK here goes.   What I am attempting is to break down large categories (devices) into subcategories (monitor, end-devices, pumps, etc) and enter their device_ids into their own tables with, in some cases the device_id as that table’s primary key.   The p_id.devices table hol

Re: [GENERAL] Saving a jpg into Postgresql table

2006-08-25 Thread Jeff Davis
On Fri, 2006-08-25 at 10:10 +0300, Kaloyan Iliev wrote: > > > > I have a projects using ASP.NET (VB.net) where i upload a jpeg file > > using a web form and then save the jpeg file into a table. I've > > decided to use "Oid" instead of "Bytea" as i heard that "Oid" is more > > memory efficient.

Re: [GENERAL] FW: Serverlog 100GB

2006-08-25 Thread Randy How
Steve, Our confusion about this is how the "serverlog" is getting populated in the first place. Where does this filename get set? How can it be changed? Looking through postgresql.conf, there is no mention of "serverlog." The logging section seems to have everything set to defaults, including

Re: [GENERAL] FW: Serverlog 100GB

2006-08-25 Thread Adrian Klaver
On Friday 25 August 2006 10:34 am, Randy How wrote: > Steve, > > Our confusion about this is how the "serverlog" is getting populated in the > first place. Where does this filename get set? How can it be changed? > Looking through postgresql.conf, there is no mention of "serverlog." The > loggin

Re: [GENERAL] hint unique result fro union

2006-08-25 Thread Matteo Bertini
Yes, the "LIMIT 1" is OK, thanks!I didn't noticed the "not executed" in the explain output!I have done some test comparing a plain table and a partitioned table performance in a particular statistical hypothesis (something explained here too: http://tagschema.com ).Mainly, data is produced and ask

[GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Marc Munro
Often, when we get short-lived network problems (like when our network admins break the firewall), postgres client apps will lock-up. They do not recover once the network is back to normal, do not time-out, and do not fail with any sort of error. This has been happening since at least postgres 7.

Re: [GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Alvaro Herrera
Marc Munro wrote: > Often, when we get short-lived network problems (like when our network > admins break the firewall), postgres client apps will lock-up. They do > not recover once the network is back to normal, do not time-out, and do > not fail with any sort of error. > > This has been happen

Re: [GENERAL] Inserting Data

2006-08-25 Thread Michael Fuhr
On Fri, Aug 25, 2006 at 09:35:21AM -0700, Bob Pawley wrote: > The library.devices table holds the static information on each > of the devices that are available to the user. Is library.devices.device_number a unique attribute? That is, for a given device_number, is there at most one row in librar

Re: [GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Marc Munro
On Fri, 2006-08-25 at 15:10 -0400, Alvaro Herrera wrote: > Wow, that's strange. Maybe it's trying to fetch something in the > message catalogs. What are your locale settings? > I'm not sure exactly what you need to know. I do have this tho: LANG=en_US.UTF-8 What other information would be h

Re: [GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Alvaro Herrera
Marc Munro wrote: > On Fri, 2006-08-25 at 15:10 -0400, Alvaro Herrera wrote: > > > Wow, that's strange. Maybe it's trying to fetch something in the > > message catalogs. What are your locale settings? > > I'm not sure exactly what you need to know. I do have this tho: > > LANG=en_US.UTF-8 >

Re: [GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Tom Lane
Marc Munro <[EMAIL PROTECTED]> writes: > As near as we can tell, it looks like libpq blocked inside poll inside > libpq_gettext. > #0 0xe405 in __kernel_vsyscall () > #1 0x005a31d4 in poll () from /lib/tls/libc.so.6 > #2 0xf7fd71ff in libpq_gettext () from /usr/lib/libpq.so.3 > #3 0xf7fd73

Re: [GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Marc Munro
On Fri, 2006-08-25 at 15:42 -0400, Alvaro Herrera wrote: > SHOW lc_messages, I think. Is it something else than C? If so, it will > probably try to read the corresponding postgres.mo file. Do the hung > processes have that file open? (I'm not sure if you can find that out > from only the core f

Re: [GENERAL] Something blocking in libpq_gettext?

2006-08-25 Thread Marc Munro
On Fri, 2006-08-25 at 15:43 -0400, Tom Lane wrote: > Marc Munro <[EMAIL PROTECTED]> writes: > > As near as we can tell, it looks like libpq blocked inside poll inside > > libpq_gettext. > > > #0 0xe405 in __kernel_vsyscall () > > #1 0x005a31d4 in poll () from /lib/tls/libc.so.6 > > #2 0xf7f

Re: [GENERAL] Saving a jpg into Postgresql table

2006-08-25 Thread Karsten Hilbert
On Fri, Aug 25, 2006 at 10:17:34AM -0700, Jeff Davis wrote: > > It takes aproximately 25-30% more disk space but is much easier for me > > to operate with it. > > When I read the object from the database I decode it and I have the file > > in the original format. > > Why not go a step further a

Re: [GENERAL] Saving a jpg into Postgresql table

2006-08-25 Thread Jeff Davis
On Fri, 2006-08-25 at 22:49 +0200, Karsten Hilbert wrote: > On Fri, Aug 25, 2006 at 10:17:34AM -0700, Jeff Davis wrote: > > > > It takes aproximately 25-30% more disk space but is much easier for me > > > to operate with it. > > > When I read the object from the database I decode it and I have th

[GENERAL] speeding up big query lookup

2006-08-25 Thread Silvela, Jaime \(Exchange\)
This is a question on speeding up some type of queries. I have a very big table that catalogs measurements of some objects over time. Measurements can be of several (~10) types. It keeps the observation date in a field, and indicates the type of measurement in another field. I often need to get t

Re: [GENERAL] SQL:2003 Window Functions for postgresql 8.3?

2006-08-25 Thread Karen Hill
Alvaro Herrera wrote: > Karen Hill wrote: > > > It would be really great if PostgreSQL supported SQL:2003 Window > > functions. I know that oracle and sql server have them already, so it > > would make postgres competitive in that area. I know there is a > > feature freeze for 8.2, is it doable

Re: [GENERAL] SQL:2003 Window Functions for postgresql 8.3?

2006-08-25 Thread Bruce Momjian
Karen Hill wrote: > > Alvaro Herrera wrote: > > Karen Hill wrote: > > > > > It would be really great if PostgreSQL supported SQL:2003 Window > > > functions. I know that oracle and sql server have them already, so it > > > would make postgres competitive in that area. I know there is a > > > fea

Re: [GENERAL] SQL:2003 Window Functions for postgresql 8.3?

2006-08-25 Thread Alvaro Herrera
Bruce Momjian wrote: > Karen Hill wrote: > > > > Alvaro Herrera wrote: > > > Karen Hill wrote: > > > > > > > It would be really great if PostgreSQL supported SQL:2003 Window > > > > functions. I know that oracle and sql server have them already, so it > > > > would make postgres competitive in th

Re: [GENERAL] SQL:2003 Window Functions for postgresql 8.3?

2006-08-25 Thread Bruce Momjian
Alvaro Herrera wrote: > Bruce Momjian wrote: > > Karen Hill wrote: > > > > > > Alvaro Herrera wrote: > > > > Karen Hill wrote: > > > > > > > > > It would be really great if PostgreSQL supported SQL:2003 Window > > > > > functions. I know that oracle and sql server have them already, so it > > > >

Re: [GENERAL] SQL:2003 Window Functions for postgresql 8.3?

2006-08-25 Thread Alvaro Herrera
Bruce Momjian wrote: > Alvaro Herrera wrote: > > Bruce Momjian wrote: > > > Karen Hill wrote: > > > > > > > > Alvaro Herrera wrote: > > > > > Karen Hill wrote: > > > > > > > > > > > It would be really great if PostgreSQL supported SQL:2003 Window > > > > > > functions. I know that oracle and sql

Re: [GENERAL] SQL:2003 Window Functions for postgresql 8.3?

2006-08-25 Thread Joshua D. Drake
I looked at the TODO list at http://www.postgresql.org/docs/faqs.TODO.html, and I don't see SQL:2003 Window Functions listed. Is it because they are not desired, or is it because there are more pressing things to accomplish? I noticed that Tom has mentioned that it appears unworkable in this thr

Re: [GENERAL] SQL:2003 Window Functions for postgresql 8.3?

2006-08-25 Thread Bruce Momjian
Alvaro Herrera wrote: > > > They are in the standard and have been mentioned many times. > > > > Mentioned how? Window functions? I have seem people ask for them in > > the past week, but never before that. > > Yeah, window functions. I remember Chris Kings-Lynne mentioning them > since at lea

[GENERAL] Errors from pgbench

2006-08-25 Thread Jeff Davis
I ran pgbench like so (8.1.4 on x86-64): $ ./bin/pgbench -s 100 -i pgbench $ ./bin/pgbench -t 10 -c 10 pgbench starting vacuum...end. Client 9 aborted in state 8: ERROR: integer out of range Client 5 aborted in state 8: ERROR: integer out of range Client 8 aborted in state 8: ERROR: integ

Re: [GENERAL] Errors from pgbench

2006-08-25 Thread Joshua D. Drake
number of transactions per client: 10 number of transactions actually processed: 384423/100 tps = 239.586507 (including connections establishing) tps = 239.589618 (excluding connections establishing) The only way I see to generate that type of error is if it tried to insert or cast an i

[GENERAL] alternative to using a sequence

2006-08-25 Thread snacktime
I have an application that processes financial transactions. Each of these transactions needs to be sent with a sequence number. It starts at 1 and resets to 1 once it hits 8000. I'm trying to think of the most elegant solution without having to create a sequence for each user (there are hundr