Solved

PostgreSQL Varchar datatype?

Posted on 2007-04-09
4
6,693 Views
Last Modified: 2008-01-09
Hey!

Just started using PostgreSQL, use to MS SQL Server. Noticed Postgre does not have a varchar table datatype.

Tried using a character[] thinking a varchar is simply a character array, though when trying to execute an insert or update on the table it's asking for {} brackets...

Please comment in detail!

Thanks :)
0
Comment
Question by:undyshelts
  • 2
4 Comments
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 18876270
It might be a better idea to post this in the PostGres or Miscellaneous section, as I doubt the average SQL Server programmer will know this stuff.  Have you tried searching the PostGres site?  http://www.postgresql.org/
0
 
LVL 62

Accepted Solution

by:
gheist earned 50 total points
ID: 18876330
http://www.postgresql.org/docs/8.2/interactive/datatype-character.html

Do you have problems with disk space that you want to use unaligned varchar sacrificing speed?
0
 
LVL 1

Author Comment

by:undyshelts
ID: 18879502
Gheist, thanks for sparking my memory!

I think you might have been over complicating the question, I was looking for the equivilant to varchar in PostgreSQL, which I have discovered is Character Varying.
0
 
LVL 62

Expert Comment

by:gheist
ID: 18881747
Whic in turn can be abberviated as "varchar"
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question