[SQL] plpgsql - Insert from a record variable?

2004-06-11 Thread Phil Endecott
Dear Postgresql experts, I'm writing a simple plpgsql function that selects a row from a table, modifies it slightly, and inserts the modified version. This sounds simple, but I can't find how to do the insert in a simple generic fashion: although SELECT has a form that puts the result in a re

pg_dump inside function (was: Re: [SQL] (No Subject))

2004-06-11 Thread Martin Knipper
Please provide a subject for futher mailings to this list. Am 11.06.2004 06:36 schrieb William Anthony Lim: > is it possible to dump within procedural language/SQL syntax? > Using pg_dump from console is very confusing for some end user > who don't have Linux skills. so I decide to create a functi

Re: [SQL] (No Subject)

2004-06-11 Thread Franco Bruno Borghesi
I remember reading somewhere that it was possible to execute system commands from plperl...  don't know if it's the best way, but you could do an exec of pg_dump from inside a plperl procedure. On Fri, 2004-06-11 at 01:36, William Anthony Lim wrote: is it possible to dump within procedural la

[SQL] casting int to bit

2004-06-11 Thread sad
PLEASE NOTE : select 1::int8::bit(64); 0001 select 1::int4::bit(64); 0001 select 1::int2::bit(64); ERROR: Cannot cast type smallint to bit the last is a great surprise for me

Re: [SQL] Converting integer to binary

2004-06-11 Thread Stephen Quinney
On Thu, Jun 10, 2004 at 05:27:31PM -0500, Bruno Wolff III wrote: > On Thu, Jun 10, 2004 at 13:24:15 -0700, > Chris Gamache <[EMAIL PROTECTED]> wrote: > > Following up on the cast to bit idea, he could do something like > casting to bit(32). I don't think there is an easy way to get this > cast t