Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8201639
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:53:09+00:00 2026-06-07T06:53:09+00:00

I need to use the awesome-looking django-storages Database storage backend for a current project,

  • 0

I need to use the awesome-looking django-storages Database storage backend for a current project, but:

It can be used to map filenames to database blobs: so you have to use it with a special additional table created manually. The table should contain a pk-column for filenames (better to use the same type that FileField uses: nvarchar(100)), blob field (image type for example) and size field (bigint).

I’ll admit it. ORM’s have spoiled me. Its been a while since I’ve written an SQL statement, and I’m not at all familiar with PostgreSQL’s flavor of SQL & BLOBs.

So, could someone pretty please help me out with a Postgres CREATE TABLE statement with three columns mentioned above (FILE_NAME, BLOB, FILE_SIZE), along with the appropriate column types?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T06:53:11+00:00Added an answer on June 7, 2026 at 6:53 am

    You generally use a column of type bytea for blobs in PostgreSQL. Your statement could look like this:

    CREATE TABLE (
      file_name text PRIMARY KEY
     ,blob bytea
     ,file_size bigint
    );
    

    There is no nvarchar in PostgreSQL like in SQL Server. You could use varchar(100) but I would advise to just use text without modifier instead.

    There are other options to store blobs. Refer to this related answer for more.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So, I need use this event so I can navigate trought blog posts. I
I need to use javascript to get the itemid of the current page in
I don't need the most parts of jQuery-mobile, but the form elements are awesome,
I'm looking for a super simple jQuery extension. Basically I need to use some
I need use this method with three distinct classes: Orders, Customers, Suppliers public void
I need use this code: <%= button_tag :class => btn btn-primary do %> <%=
I have installed Matlab r2010a on my computer I need use the function xlsread
Need to use own imaged markers instead built-in pins. I have several questions. 1.
I need to use maps on running in a physical Android device, how do
I need to use the objdump and readelf commands in my application that runs

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.