[GENERAL] BLOB problem

2004-02-03 Thread Rens Admiraal
Hi, I've encountered a problem with a PostgreSQL database. I made a image management system which stores images in a database from a PHP script. I upload te file using pg_lo_import() (PHP function). Everything works fine, fast, and I was really glad with it, till I found out that my

Re: [GENERAL] BLOB problem

2004-02-03 Thread Doug McNaught
Rens Admiraal [EMAIL PROTECTED] writes: I've encountered a problem with a PostgreSQL database. I made a image management system which stores images in a database from a PHP script. I upload te file using pg_lo_import() (PHP function). Everything works fine, fast, and I was really

[GENERAL] Copy and xml files

2004-02-03 Thread C G
Dear All, I'm trying to insert an xml file into my database. I have a table with a single text column. My intention is just to have the xml file take up one row in the table. I've tried the command COPY t1 FROM '/tmp/file.xml'; but keep getting the error message ERROR: extra data after

[GENERAL] large crontab database design

2004-02-03 Thread David Garamond
I was thinking on how one would design an optimal (performance-wise) database of large number of schedules with crontab-like semantic. There will potentially be hundreds of thousands or even millions of crontab entries, and there will be a query run once every minute to determine which entries

Re: [GENERAL] large crontab database design

2004-02-03 Thread Csaba Nagy
David, I have another solution working (not using data base persistence, but the idea is the same). We have the next run time saved along with the original cron-tab string, which is left as it is (not broken down to any details). The system polls for the earliest next runtime, and executes the

Re: [GENERAL] Copy and xml files

2004-02-03 Thread Chris Gamache
COPY works for whole tables, and can't append rows. You're going to have to escape your linebreaks and tabs to use COPY ... As I recall, you can specify your own custom column and row delimiters... You might consider creating some type of primary key for the table. A serial column would work

Re: [GENERAL] Pl/tcl auto-load problem

2004-02-03 Thread Craig Addleman
Thanks for the response Jan. I was *appending* my code to the unknown proc; when I *inserted* it, I can can access variables via upvar. I'm not sure this is the right way to do it though: proc unknown {proname args} { upvar #0 __appver p_appver upvar #0

Re: [GENERAL] problem with jdbc connection to postgesql

2004-02-03 Thread Paul Thomas
On 03/02/2004 15:45 Phil Campaigne wrote: Hi All, I am seting up my web app with a tomcat/postgresql hosting service. From my psql client I type psql and then I am asked for my password. This logs me into my hosted database just fine. However, I can't log on from my webapp to the database thru

Re: [GENERAL] Anyone has nls activated on Mac OS X?

2004-02-03 Thread Peter Eisentraut
Francois Suter wrote: I installed gettext using Fink and then gave it a go. The configure part went ok, but make complained that it couldn't find msgfmt. Either the package is split up into a run-time and a devel package, or it's just plain broken, because msgfmt certainly belongs into any

Re: [GENERAL] Before ship 7.4.2

2004-02-03 Thread Lamar Owen
On Monday 02 February 2004 10:54 pm, Tom Lane wrote: Gaetano Mendola [EMAIL PROTECTED] writes: Is someone taking care about the fact that the pgdb.py shipped with 7.4.1 is the wrong version? There is no pgdb.py in the core PG 7.4.* releases. I suppose you are talking about a packaging

Re: [GENERAL] Are there commands to enquire about table structure?

2004-02-03 Thread Ben
On Sat, 31 Jan 2004 23:41:54 -0500, Doug McNaught wrote: For 7.3, the info you need is available in the system catalogs, which have a somewhat hairier layout than the SQL-standard information_schema. Using Doug's pointer, I came up with this for 7.3... SELECT

[GENERAL] Specifying a index

2004-02-03 Thread Marcio Caetano
Hello ! Consider the examples bellow: 1- I create a table named TBA with columns ( A int , B char(10) ) 2- I create an B-Tree index named IDXA using the column A 3- I create an GIST (or other) index named IDXB using the column A So, I ask you: Is it possible specify which index (IDXA or

[GENERAL] BLOB problem

2004-02-03 Thread Rens Admiraal
Hi, I've encountered a problem with a PostgreSQL database. I made a image management system which stores images in a database from a PHP script. I upload te file using pg_lo_import() (PHP function). Everything works fine, fast, and I was really glad with it, till I found out that my database

[GENERAL] Multicolumn Indexing using R-Tree

2004-02-03 Thread Marcio Caetano
Hello ! I'm using PostgreSQL 7.3.2 and I need to create a R-Tree index that uses more than one column in a table. When I run the instruction it appears this message bellow: DefineIndex: access method rtree does not support multi-column indexes How can I solve this problem ? Is it a

Re: [GENERAL] Before ship 7.4.2

2004-02-03 Thread Gaetano Mendola
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Lamar Owen wrote: | On Monday 02 February 2004 10:54 pm, Tom Lane wrote: | |Gaetano Mendola [EMAIL PROTECTED] writes: | |Is someone taking care about the fact that the pgdb.py shipped with |7.4.1 is the wrong version? | | |There is no pgdb.py in the

Re: [GENERAL] Are there commands to enquire about table structure?

2004-02-03 Thread Gregory Wood
Further pointers are welcome, otherwise if I figure it out myself, I'll post the results. Just an opinion here, but I would implement these queries as views similar to the information schema. That way you won't have to port everything when the database changes. Once you upgrade to 7.4 you can

Re: [GENERAL] Are there commands to enquire about table structure?

2004-02-03 Thread Tom Lane
Ben [EMAIL PROTECTED] writes: Using Doug's pointer, I came up with this for 7.3... SELECT a.relname,b.attname,c.typname,b.attlen,b.atttypmod FROM pg_class AS a LEFT OUTER JOIN pg_attribute AS b ON (b.attrelid = a.oid) LEFT OUTER JOIN pg_type AS c ON (b.atttypid = c.oid)

Re: [GENERAL] Specifying a index

2004-02-03 Thread Tom Lane
[EMAIL PROTECTED] (Marcio Caetano) writes: 1- I create a table named TBA with columns ( A int , B char(10) ) 2- I create an B-Tree index named IDXA using the column A 3- I create an GIST (or other) index named IDXB using the column A Is it possible specify which index (IDXA or IDXB) my

Re: [GENERAL] BLOB problem

2004-02-03 Thread Tom Lane
Rens Admiraal [EMAIL PROTECTED] writes: upload te file using pg_lo_import() (PHP function). Everything works fine, fast, and I was really glad with it, till I found out that my database is rapadly growing. With only 20 images the database has a size of 65 MB !!! Hard to tell much from that