pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Gnanavel Shanmugam <s.gnanavel@inbox.com>
To: Raul Secan <raul@zerosoft.ro>
To: pgsql-php@postgresql.org
Subject: Re: varchar error
Date: Thu, 23 Jun 2005 00:53:09 -0800
Message-ID: <5A50EF07DAA.00000851s.gnanavel@inbox.com> (raw)
In-Reply-To: <000d01c577cc$2c9c1f30$0a10a8c0@zerosoft.ro>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML><HEAD><META http-equiv=Content-Type content="text/html; charset=utf-8"><META content="IBISIT WebMail" name=GENERATOR></HEAD><BODY>
<div>try with either Rule or Trigger.<br>
&nbsp;</div><div>with regards,<br>S.Gnanavel</div><br><br><blockquote style="border-left: 2px solid rgb(0, 0, 255); padding-left: 5px; margin-left: 5px; margin-right: 0px;"><div class="msgHeaders">-----Original Message-----<br><b>From:</b> raul@zerosoft.ro<br><b>Sent:</b> Thu, 23 Jun 2005 11:18:45 +0300<br><b>To:</b> pgsql-php@postgresql.org<br><b>Subject:</b> [PHP] varchar error<br><br></div><div class="oldBody"><div>
<div><font color="#800000" face="Verdana" size="2">Hello, I just have 
this:</font></div>
<div><font color="#800000" face="Verdana" size="2"></font>&nbsp;</div>
<div><font color="#800000" face="Verdana" size="2">CREATE TABLE test 
(<br>&nbsp;&nbsp;&nbsp; mytext varchar(5)<br>) WITHOUT OIDS;</font></div>
<div><font color="#800000" face="Verdana" size="2"></font>&nbsp;</div>
<div><font color="#800000" face="Verdana" size="2">If I put a string with more than 5 
chars in mytext, I receive an error, regarding the wrong lenght of the 
string.</font></div>
<div><font color="#800000" face="Verdana" size="2"></font>&nbsp;</div>
<div><font color="#800000" face="Verdana" size="2">In MySQL I know that the string is 
automatically reduced to the number of char allowed by the column, even if I 
insert a longer string.</font></div>
<div><font color="#800000" face="Verdana" size="2"></font>&nbsp;</div>
<div><font color="#800000" face="Verdana" size="2">I don't want to do this from PHP, 
and I was wandering how this can&nbsp;be done in PostreSQL? Maybe in CREATE 
TABLE definition?</font></div>
<div><font color="#800000" face="Verdana" size="2"></font>&nbsp;</div>
<div><font color="#800000" face="Verdana" size="2">Cheers, 
Raul.</font></div></div></div></blockquote>
</BODY></HTML>


view thread (6+ messages)  latest in thread

Message-ID: <5A50EF07DAA.00000851s.gnanavel@inbox.com>
Permalink:  ../5A50EF07DAA.00000851s.gnanavel@inbox.com/
Also on:    postgresql.org/message-id/5A50EF07DAA.00000851s.gnanavel@inbox.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: s.gnanavel@inbox.com, raul@zerosoft.ro
  Subject: Re: varchar error
  In-Reply-To: <5A50EF07DAA.00000851s.gnanavel@inbox.com>
  References: <000d01c577cc$2c9c1f30$0a10a8c0@zerosoft.ro> <5A50EF07DAA.00000851s.gnanavel@inbox.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox