[SQL] BLOBs vs BYTEA

2005-01-31 Thread Sam Adams
Hi,

Apologies if I've already sent a post asking this but I'm not sure if it
actually went through last time as it doesn't seem to be in my sent
items box.

Anyway, I was wondering which would be a better way to store a large
amount of files each a few megabytes in size. There could be hundreds of
thousands of files altogether. If stored as BYTEAs this would put them
all in a single table. Would this effect performance considerablely? I
assume if there were thousands then it would. But if the data is stored
as BLOBs then aren't they store inside the database just in another
table? Wouldn't this also be undesirable. Would it be better to store
them normally on the file system and just provide the path and file name
in the database. Obviously this wont provide any security or backup but
would it make sense to do it this way with such a large amount of data?

Thanks.

-Sam

---(end of broadcast)---
TIP 5: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


[SQL] Serial and Index

2005-02-27 Thread Sam Adams
I read at http://jamesthornton.com/postgres/FAQ/faq-english.html#4.15.1
that when a serial is created then an index is created on the column.
However I can't seem to find this anywhere in the PoistgreSQL manual. Is
this true? Thanks.

-Sam

---(end of broadcast)---
TIP 7: don't forget to increase your free space map settings


[SQL] Java and Currval

2005-05-02 Thread Sam Adams
I'm having trouble getting the currval function to work from a Java
program (or from Postgres at all). I want to get the value of addressid
in the table taddress. The best I seem to be able to come up with is
'SELECT currval(taddress.addressid)'. However this gives me the error
'ERROR:  relation "1" does not exist' or whatever the number should be.
I've tried lots of variations but can't seem to work it out. What am I
doing wrong? Thanks.

-Sam

---(end of broadcast)---
TIP 3: if posting/reading through Usenet, please send an appropriate
  subscribe-nomail command to [EMAIL PROTECTED] so that your
  message can get through to the mailing list cleanly