Re: 2 Questions - Mailing list pgsql-novice

From Devrim GUNDUZ
Subject Re: 2 Questions
Date
Msg-id Pine.LNX.4.63.0512230916240.7654@evim.gunduz.org
Whole thread Raw
In response to 2 Questions  (Ramon Orticio <rporticio@yahoo.com>)
List pgsql-novice
Hi,

On Thu, 22 Dec 2005, Ramon Orticio wrote:

> i'm using a laptop with redhat 9 OS.
>
> 1. how do you create or transfer to another location
> postgres database aside from the initial
> PGDATA=/var/lib/pgsql/data

I think you are using RPM installation.

So, first stop postmaster. Then move the initial data cluster to another
directory you wish. Edit /etc/init.d/postgresql and change all
/var/lib/pgsql/data to the new value. Then start PostgreSQL again.

> 2. how can a jpeg or bmp file be stored in postgres.

You need to use bytea data type for that:

http://www.postgresql.org/docs/current/static/datatype-binary.html
http://www.postgresql.org/docs/current/static/largeobjects.html

Regards,
--
The PostgreSQL Company - Command Prompt, Inc. 1.503.667.4564
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, plPerlNG - http://www.commandprompt.com/

pgsql-novice by date:

Previous
From: Dario Brignardello
Date:
Subject: Re: 2 Questions
Next
From: Mag Gam
Date:
Subject: PostgreSQL Logging