Re: Text data type doesn't accept newlines?

From: Neil Conway <nconway(at)klamath(dot)dyndns(dot)org>
To: Randall Perry <rgp(at)systame(dot)com>
Cc: Gordan Bobic <gordan(at)freeuk(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Text data type doesn't accept newlines?
Date: 2001-06-06 22:31:58
Message-ID: 20010606183158.A178@klamath.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Jun 06, 2001 at 09:24:19AM -0400, Randall Perry wrote:
> Just checked the Pg docs, don't see a quote function. What is it part of?

It's part of DBI, a system for connecting Perl to databases. You can use
DBI with Postgres -- but apparently you're not doing this, since you
mentioned you're using Pg.pm (the plain interface to libpq). The
Postgres driver for DBI is called DBD::Pg, BTW -- make sure you don't
get them confused.

So the advice below WRT using 'quote' doesn't apply.

BTW, you might want to checkout DBI -- I find it to be more pleasant to
use than Pg.pm

Cheers,

Neil

> > Are you using the "quote" function? You have to use it if you are to
> > guarantee that the data will be acceptable as "input".
> >
> > $myVar = $myDB -> quote ($myVar)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-06-06 22:37:00 Re: [SQL] maximum number of rows in table - what about oid limits?
Previous Message Bruno Wolff III 2001-06-06 22:19:07 using create constraint trigger