I tried but couldn't find an answer if this is possible in psql.
Create a file named test.sql
select * from mytable where id = ? (or use $1, $2...)
Then in psql do
\i test.sql 337
to achieve the same effect select * from mytable where id=337
as I would in perl
$sth =
Put it into a shell script like
echo select * from mytable where id = $1; | psql $DBNAME
That can be executed using the shell function in psql
\! [COMMAND] execute command in shell or start interactive shell
regards,
-Andreas
On Wednesday 28 April 2004 17:46, Ben Kim wrote:
I tried but
Are there any binaries for the Red Hat Enterprise Linux 2.1.The OSshipped with Postgresql 7.1.3... I would like to upgrade. Are there any suggestions?
Thanks
Do you Yahoo!?Win a $20,000 Career Makeover at Yahoo! HotJobs
Im looking for some documentation on writing stored
procedures using PL/Perl. The PostrgeSQL tutorials
give only a brief introduction to this which is good
but enough :
http://www.postgresql.org/docs/7.4/static/plperl.html
Can anyone pls send any links to more documentation.
Thanks
Christopher Smith [EMAIL PROTECTED] writes:
Are there any binaries for the Red Hat Enterprise Linux 2.1. The OS shipped with
Postgresql 7.1.3... I would like to upgrade. Are there any suggestions?
Get a more recent SRPM and do rpmbuild --rebuild. I haven't tried it
but I know of no reason it
do you mean that, declaring an index serial, I'd never have to deal with
incrementing its primary key? good to know!
Yep. You can use 'DEFAULT' as the value, eg:
INSERT INTO blah (DEFAULT, ...);
anyway in this particular situation I don't need such accurate
behaviour: this table is filled up
do you mean that, declaring an index serial, I'd never have to deal with
incrementing its primary key? good to know!
anyway in this particular situation I don't need such accurate
behaviour: this table is filled up with a lot of data twice per week and
it's used only to answer queries.
I could
On Wed, Apr 28, 2004 at 10:13:14 +0200,
Edoardo Ceccarelli [EMAIL PROTECTED] wrote:
do you mean that, declaring an index serial, I'd never have to deal with
incrementing its primary key? good to know!
That isn't what is happening. Serial is a special type. It is int plus
a default rule
All,
After I upgraded postgres from 7.3.4 to 7.4.2, one of my program got following error:
DRROR: out of memory
DETAIL: Fail on request of size 92.
any idea??
does memory management have big difference between 7.3.4 and 7.4.2???
this program using a chunk of share memory and a lot of temp