Re: [OT] PostgreSQL: bytea help needed.
From: mlw (mlw_at_nospam.no)
Date: 02/04/05
- Next message: cameron: "Re: TTYs"
- Previous message: E. Charters: "Re: How does one teach Linux?"
- In reply to: Mike Cox: "Re: [OT] PostgreSQL: bytea help needed."
- Next in thread: Christopher Browne: "Re: [OT] PostgreSQL: bytea help needed."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 03 Feb 2005 22:21:44 -0500
Mike Cox wrote:
> mlw <mlw@nospam.no> writes:
>
>> Mike Cox wrote:
>>
>> > Christopher Browne <cbbrowne@acm.org> writes:
>> >
>> >> Centuries ago, Nostradamus foresaw when Mike Cox
>> >> <mikecoxlinux@yahoo.com> would write:
>> >> > Does anyone know how to add data to a bytea in PostgreSQL? I
>> >> > googled
>> >> > the archives, and they mostly talk about PHP. I'd like to put
>> >> > binary data in the bytea from my local filesystem, but google comes
>> >> > up empty other than using PHP.
>> >>
>> >> Well, you draw the data in, and then append it to the field.
>> >
>> > Well this is elementary stuff. Lets say I wanted to pull a jpg into
>> > the database from my local filesystem for example.
>>
>> My first reaction would be to say you are insane. Using a database as a
>> file system isn't its best used.
>
> You are wrong about this. I'm already using it for every text
> document, html page via the COPY command. My goal is to have a WinFS
> like filesystem on linux machine. You cannot believe how much better
> having all my data stored in a database is. I used to have my home
> directory cluttered with various data. It was a complete mess.
No, you just moved the clutter to a system which has fewer tools for
managing it.
>
> Now I just do an SQL search and BAM! I get exactly what I want. It
> gets even better when you have the tsearch2 from PostgreSQL Contrib
> installed. It is like google search squared!
I actually have a text search engine for Linux. It creates a full text
search index with soundex, metaphone, and logical operations. It *is* like
google for the desktop.
>
> Now I can search for different types of critera with the speed of an
> SQL database engine.
Yes and no. Don't get me wrong, it sounds like fun, but I'm not convinced
that you are using the best tools for the desired solution. A database is
good, and there are some very cool advantages to using it the way you are,
but depending on your application, you can do much better by leaving the DB
to handle the "information" and the file system to handle the files.
>
>>I would store the file path and name and have a
>> separate volume or directory for the image. Especially if you are using
>> large images.
>
> Nah. I want to be able to do image matching for similar images, mp3s,
> etc.
Unless you are talking about the tags in the MP3 file, you need some
sophisticated (and time consuming) algorithms to do "sounds like" searches.
If you are talking about the mp3 tags, it would be trivial to store the
tags in the database along with the filename.
> If you can specify something with the "like" command to find similar
> binary data, it would be totally awesome. WinFS on my desktop years
> before Longhorn EVER comes out with it.
- Next message: cameron: "Re: TTYs"
- Previous message: E. Charters: "Re: How does one teach Linux?"
- In reply to: Mike Cox: "Re: [OT] PostgreSQL: bytea help needed."
- Next in thread: Christopher Browne: "Re: [OT] PostgreSQL: bytea help needed."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|