what is the data type for files(.txt,.doc,.jpeg) in pgsql

Started by rama krishnaabout 20 years ago3 messagesgeneral
Jump to latest
#1rama krishna
arkr505@gmail.com

1)I need to insert the files in database .So what i have to give the
data type for that field while creating the table.

And how to insert and select the file from the database.

2)I need to perform some action in database before it shutting down
or before booting of my server.What to do for this situation

#2Peter Eisentraut
peter_e@gmx.net
In reply to: rama krishna (#1)
Re: what is the data type for files(.txt,.doc,.jpeg) in pgsql

rama krishna wrote:

1)I need to insert the files in database .So what i have to give the
data type for that field while creating the table.

bytea -- Look into the documentation for encoding and other handling
issues.

2)I need to perform some action in database before it shutting down
or before booting of my server.What to do for this situation

Such a thing doesn't exist in PostgreSQL. You may be able to do this
with an external tool, but offhand I can't imagine how.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

#3Michael Fuhr
mike@fuhr.org
In reply to: Peter Eisentraut (#2)
Re: what is the data type for files(.txt,.doc,.jpeg) in pgsql

On Tue, Feb 07, 2006 at 10:58:27AM +0100, Peter Eisentraut wrote:

rama krishna wrote:

2)I need to perform some action in database before it shutting down
or before booting of my server.What to do for this situation

Such a thing doesn't exist in PostgreSQL. You may be able to do this
with an external tool, but offhand I can't imagine how.

A command (psql or otherwise) in PostgreSQL's startup/shutdown
script might work if that script is run at the required times
(automatically during boot and shutdown and manually whenever you
start and stop the database yourself).

--
Michael Fuhr