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

Lists: pgsql-general
From: rama krishna <arkr505(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: what is the data type for files(.txt,.doc,.jpeg) in pgsql
Date: 2006-02-07 03:35:01
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-general

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


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: rama krishna <arkr505(at)gmail(dot)com>
Subject: Re: what is the data type for files(.txt,.doc,.jpeg) in pgsql
Date: 2006-02-07 09:58:27
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-general

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/


From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-general(at)postgresql(dot)org, rama krishna <arkr505(at)gmail(dot)com>
Subject: Re: what is the data type for files(.txt,.doc,.jpeg) in pgsql
Date: 2006-02-07 17:38:25
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-general

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