Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Jason Long
Sam Mason wrote: On Wed, Jan 14, 2009 at 12:56:42AM +, Sam Mason wrote: If you Java you'd probably be better off using it Hum, it's getting late. That should be "If you *know* Java"! Bed time for me I think! Sam Thanks for the advice. I will probably go with Java. In th

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Sam Mason
On Wed, Jan 14, 2009 at 12:56:42AM +, Sam Mason wrote: > If you Java you'd probably be better off using it Hum, it's getting late. That should be "If you *know* Java"! Bed time for me I think! Sam -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Sam Mason
On Tue, Jan 13, 2009 at 06:43:06PM -0600, Jason Long wrote: > Sam Mason wrote: > >If you're OK with using large objects, instead of "bytea"s, you can use > >the lo_import function. > > *They are on the server. I would rather use bytea. Is it possible to > import them as large objects and then us

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Jason Long
Sam Mason wrote: On Tue, Jan 13, 2009 at 06:22:34PM -0600, Jason Long wrote: Sam Mason wrote: You'd need to generate the SQL somehow; if you know python it's probably a pretty easy 20 or 30 lines of code to get this working. *Never used Python or Perl. I use primarily Java.

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Sam Mason
On Tue, Jan 13, 2009 at 06:22:34PM -0600, Jason Long wrote: > Sam Mason wrote: > >You'd need to generate the SQL somehow; if you know python it's probably > >a pretty easy 20 or 30 lines of code to get this working. > *Never used Python or Perl. I use primarily Java. I was thinking of > doing s

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Jason Long
Sam Mason wrote: On Tue, Jan 13, 2009 at 03:28:18PM -0600, Jason Long wrote: Steve Atkins wrote: On Jan 13, 2009, at 10:34 AM, Jason Long wrote: I would like to use PSQLFS(http://www.edlsystems.com/psqlfs/) to store 100 GB of images in PostgreSQL. Is there a better way to load

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Sam Mason
On Tue, Jan 13, 2009 at 03:28:18PM -0600, Jason Long wrote: > Steve Atkins wrote: > >On Jan 13, 2009, at 10:34 AM, Jason Long wrote: > >>I would like to use PSQLFS(http://www.edlsystems.com/psqlfs/) > >>to store 100 GB of images in PostgreSQL. > >> > >>Is there a better way to load 20,000 plus file

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Jason Long
Steve Atkins wrote: On Jan 13, 2009, at 10:34 AM, Jason Long wrote: I would like to use PSQLFS(http://www.edlsystems.com/psqlfs/) to store 100 GB of images in PostgreSQL. Once they are in there I can deal with them. My main purpose is to use rsync to get the files into the database. Is th

Re: [GENERAL] Cast for text->Integer missing in 8.3.5

2009-01-13 Thread Tom Lane
"Nykolyn, Andrew" writes: > The above has all worked great to get me past the two issues described > so far. Now I am having a problem with: function quote_literal is not > unique. And you're going to have a few other problems after you get past that. You can't just insert implicit casts and exp

Re: [GENERAL] Returning number of matches on a query when using limit

2009-01-13 Thread Reg Me Please
On Tuesday 13 January 2009 21:56:56 Mohamed wrote: > Hi. How would I return the number of matches found by a query, but when I > only want to return 30 of them ? > In MySQL there is a way of calling SQL_CALC_FOUND_ROWS to do this? > > Is there something similiar that can be done in PostgreSQL ? Do

[GENERAL] Returning number of matches on a query when using limit

2009-01-13 Thread Mohamed
Hi. How would I return the number of matches found by a query, but when I only want to return 30 of them ? In MySQL there is a way of calling SQL_CALC_FOUND_ROWS to do this? Is there something similiar that can be done in PostgreSQL ? Do I have to rerun my query? Thanks / Moe

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Steve Atkins
On Jan 13, 2009, at 10:34 AM, Jason Long wrote: I would like to use PSQLFS(http://www.edlsystems.com/psqlfs/) to store 100 GB of images in PostgreSQL. Once they are in there I can deal with them. My main purpose is to use rsync to get the files into the database. Is there a better way to

[GENERAL] XPath to search for elements in a sequence

2009-01-13 Thread Brad Balmer
With XML similar to: < a > < b > < c > 1 < c > 2 < c > 3 I'm trying to create an xpath expression (for a postgresql query) that will return if is a particular value and not that is all three values. What I currently have (which does not work) is: select * from someTable where xpat

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Jason Long
bytea was what I was going for. *Does anyone have a script they would share for this purpose? * If not I will probably use Java because this is what I am familiar with. The web app I will write for managing my photos will be written in Java. I want to be able to categorize, label, search,

Re: [GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Alan Hodgson
On Tuesday 13 January 2009, Jason Long wrote: > I would like to use PSQLFS(http://www.edlsystems.com/psqlfs/) > to store 100 GB of images in PostgreSQL. > > Once they are in there I can deal with them. My main purpose is to use > rsync to get the files into the database. > > Is there a better wa

[GENERAL] Use PSQLFS for photo storage

2009-01-13 Thread Jason Long
I would like to use PSQLFS(http://www.edlsystems.com/psqlfs/) to store 100 GB of images in PostgreSQL. Once they are in there I can deal with them. My main purpose is to use rsync to get the files into the database. Is there a better way to load 20,000 plus files reliably into Postgres? -- S

Re: [GENERAL] Cast for text->Integer missing in 8.3.5

2009-01-13 Thread Nykolyn, Andrew
2009/1/13 Aleksander Kmetec : > > Nykolyn, Andrew wrote: >> >> I am trying to upgrade my Postgres server from 8.2.3 to 8.3.5 and >> have found that the cast text->integer and integer->text are missing. >> Is there a reason why they are not there and how can I get them back. >> I have many stored

Re: [GENERAL] Cast for text->Integer missing in 8.3.5

2009-01-13 Thread Tom Lane
"Scott Marlowe" writes: > On Tue, Jan 13, 2009 at 8:23 AM, Nykolyn, Andrew > wrote: >> I am trying to upgrade my Postgres server from 8.2.3 to 8.3.5 and have found >> that the cast text->integer and integer->text are missing. Is there a >> reason why they are not there and how can I get them ba

Re: [GENERAL] Trying to create implicit casts to text in PG 8.3

2009-01-13 Thread Sam Mason
On Tue, Jan 13, 2009 at 09:14:15AM -0800, Joshua D. Drake wrote: > On Tue, 2009-01-13 at 16:58 +, Sam Mason wrote: > > In the end, any type system is just a tool. It's main job is to find > > bugs in code by spotting a common class of error > > The purpose of the database as a whole is to pre

Re: [GENERAL] Cast for text->Integer missing in 8.3.5

2009-01-13 Thread Scott Marlowe
On Tue, Jan 13, 2009 at 8:23 AM, Nykolyn, Andrew wrote: > I am trying to upgrade my Postgres server from 8.2.3 to 8.3.5 and have found > that the cast text->integer and integer->text are missing. Is there a > reason why they are not there and how can I get them back. I have many > stored procedu

Re: [GENERAL] Trying to create implicit casts to text in PG 8.3

2009-01-13 Thread Joshua D. Drake
On Tue, 2009-01-13 at 16:58 +, Sam Mason wrote: > In the end, any type system is just a tool. It's main job is to find > bugs in code by spotting a common class of error The purpose of the database as a whole is to preserve the integrity of your data. The type system is a key component of tha

Re: [GENERAL] Cast for text->Integer missing in 8.3.5

2009-01-13 Thread Emanuel Calvo Franco
2009/1/13 Aleksander Kmetec : > > Nykolyn, Andrew wrote: >> >> I am trying to upgrade my Postgres server from 8.2.3 to 8.3.5 and have >> found that the cast text->integer and integer->text are missing. Is there a >> reason why they are not there and how can I get them back. I have many >> stored

Re: [GENERAL] Trying to create implicit casts to text in PG 8.3

2009-01-13 Thread Sam Mason
On Tue, Jan 13, 2009 at 05:43:52PM +0100, Aleksander Kmetec wrote: > I added both "||(double precision, text)" and "||(text, double > precision)" operators and it works now. > > But I'm wondering: do I need to do anything else besides creating implicit > casts and adding missing operators? And w

Re: [GENERAL] Cast for text->Integer missing in 8.3.5

2009-01-13 Thread Aleksander Kmetec
Nykolyn, Andrew wrote: I am trying to upgrade my Postgres server from 8.2.3 to 8.3.5 and have found that the cast text->integer and integer->text are missing. Is there a reason why they are not there and how can I get them back. I have many stored procedures that rely on those casts I'm ri

Re: [GENERAL] Trying to create implicit casts to text in PG 8.3

2009-01-13 Thread Aleksander Kmetec
Emanuel Calvo Franco wrote: You add the cast's but not the operator. The cast is in other way (try to compare with a text '13') for example. Thanks. I added both "||(double precision, text)" and "||(text, double precision)" operators and it works now. But I'm wondering: do I need to do anyth

Re: [GENERAL] Cast for text->Integer missing in 8.3.5

2009-01-13 Thread Emanuel Calvo Franco
2009/1/13 Nykolyn, Andrew : > I am trying to upgrade my Postgres server from 8.2.3 to 8.3.5 and have found > that the cast text->integer and integer->text are missing. Is there a > reason why they are not there and how can I get them back. I have many > stored procedures that rely on those casts

Re: [GENERAL] Polymorphic "setof record" function?

2009-01-13 Thread Sam Mason
On Tue, Jan 13, 2009 at 02:50:49PM +0100, Christian Schrrrder wrote: > I have written a function that returns a setof record. The function has > a table name as a parameter and the resulting records have the same > structure as this table. Is there any easy way to specify this when I > call the

[GENERAL] Cast for text->Integer missing in 8.3.5

2009-01-13 Thread Nykolyn, Andrew
I am trying to upgrade my Postgres server from 8.2.3 to 8.3.5 and have found that the cast text->integer and integer->text are missing. Is there a reason why they are not there and how can I get them back. I have many stored procedures that rely on those casts

Re: [GENERAL] Polymorphic "setof record" function?

2009-01-13 Thread Emanuel Calvo Franco
2009/1/13 Christian Schröder : > Hi list, > I have written a function that returns a setof record. The function has a > table name as a parameter and the resulting records have the same structure > as this table. Is there any easy way to specify this when I call the > function? If the table has man

[GENERAL] Polymorphic "setof record" function?

2009-01-13 Thread Christian Schröder
Hi list, I have written a function that returns a setof record. The function has a table name as a parameter and the resulting records have the same structure as this table. Is there any easy way to specify this when I call the function? If the table has many columns then it's annoying to spec

Re: [pgsql-advocacy] [GENERAL] PgUS 2008 end of year summary

2009-01-13 Thread Alvaro Herrera
Scott Marlowe escribió: > In this thread getting a bounce from advocacy won't bother me too > much. Having hundreds ot bounce messages in a busy thread, would be > much much worse. Yup. > I wonder, if all the mailing lists are run by the same software, > wouldn't it be easy enough to have a kin

Re: [GENERAL] Trying to create implicit casts to text in PG 8.3

2009-01-13 Thread Emanuel Calvo Franco
2009/1/13 Aleksander Kmetec : > Hi, everyone. > > I'm trying to upgrade a database which is used by several hundred > installations of an app; with each installation possibly running some custom > code and 3rd party extensions. I was hoping that it would be possible to > re-add implicit casts to te

[GENERAL] limit and other joined tables

2009-01-13 Thread Ivan Sergio Borgonovo
Is the planner/optimiser smart enough to join just after the LIMIT in a similar situation: select [columns from A, B and C] from A join B on A.Aid=B.Bid join C on A.Aid=C.Cid where (conditions on A and B columns) order by [columns from A and B] limit 10; What about a similar situation with subsel

Re: [GENERAL] one-click installer in linux redhat-centos-fedora

2009-01-13 Thread Dave Page
On Tue, Jan 13, 2009 at 9:36 AM, m zyzy wrote: > I successfully install the .bin installer in linux redhat-centos-fedora. > After a few days using pgadmin and postgresql in the one-click ,I decided > to go back to old plain postgresql and postGIS (Am I right ? the one click > installer not inclu

[GENERAL] one-click installer in linux redhat-centos-fedora

2009-01-13 Thread m zyzy
I successfully install the .bin installer in linux redhat-centos-fedora. After a few days using pgadmin and postgresql in the one-click ,I decided to go back to old plain postgresql and postGIS (Am I right ? the one click installer not include the PostGIS extension. ) . Is there an option to unin