Storing Media Types - Mailing list pgsql-general

From Carlos Mennens
Subject Storing Media Types
Date
Msg-id AANLkTikh2+5mBHSeD+Ztt1DHExbfuTKhXtEnS7v-FXyk@mail.gmail.com
Whole thread Raw
Responses Re: Storing Media Types
List pgsql-general
I've created a basic table called 'employees' & I've been asked to
store a profile photo of all employees. I've looked on Google and the
9.0 documentation but can't find any clear instructions on how I would
be to insert photo's stored in a local directory on the server
(/var/lib/postgres/data/media/pics). I'm trying to understand how I
would create an entry into the table I show below to be able to add
photo's for each user. Does anyone have an example of what the code
would look like and or offer any assistance?


ghost=> CREATE TABLE employees
(
id INT PRIMARY KEY NOT NULL UNIQUE,
fname VARCHAR(50) NOT NULL,
lname VARCHAR(50) NOT NULL,
email VARCHAR(50) UNIQUE NOT NULL,
branch VARCHAR(50) NOT NULL,
position VARCHAR(50) NOT NULL,
office INT NOT NULL,
dob DATE NOT NULL,
photo ?
)
;
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index
"employees_pkey" for table "employees"
NOTICE:  CREATE TABLE / UNIQUE will create implicit index
"employees_email_key" for table "employees"
CREATE TABLE

-Carlos

pgsql-general by date:

Previous
From: Joshua Tolley
Date:
Subject: Compellent SAN, anyone?
Next
From: Tom Lane
Date:
Subject: Re: Relative ordering in array aggregation