Re: [SQL] polymorphic functions and domains

2007-12-06 Thread Tom Lane
"TJ O'Donnell" <[EMAIL PROTECTED]> writes: > I really want two polymorphic functions, one taking > a domain data type using varchar and one bytea. These aren't polymorphic functions, actually; they're just overloaded. > In that case, postgres complains that it cannot decide > which one to use whe

[SQL] Rule rewrite to possible union?

2007-12-06 Thread Erik Jones
Here's what I'd like to happen, but I'm not seeing how it can be done. Say we have this simple table: CREATE TABLE foo ( id integer, foo varchar ); and then many tables along these lines: CREATE TABLE ud1_foo (LIKE foo); CREATE TABLE ud2_foo (LIKE foo); What I'd like is to do is select agains

[SQL] polymorphic functions and domains

2007-12-06 Thread TJ O'Donnell
When I define two polymorpic functions, one taking varchar and one bytea, there seems to be no confusion choosing the varchar version when called with the untyped literal 'abc'. I really want two polymorphic functions, one taking a domain data type using varchar and one bytea. In that case, postg

Re: [SQL] execute system command from storage procedure

2007-12-06 Thread Andreas Kretschmer
Sabin Coanda <[EMAIL PROTECTED]> schrieb: > Hi there, > > Is it possible to execute a system command from a function ? (e.g. bash ) Yes, of course, but you need an untrusted language like pl/perlU oder plsh. http://plsh.projects.postgresql.org/ Andreas -- Really, I'm not out to destroy Micros

Re: [SQL] execute system command from storage procedure

2007-12-06 Thread Erik Jones
On Dec 6, 2007, at 10:32 AM, Sabin Coanda wrote: Hi there, Is it possible to execute a system command from a function ? (e.g. bash ) If you use one of the untrusted procedural languages (e.g. plperlu, plpythonu, ...) you can. Erik Jones Software Developer | Emma® [EMAIL PROTECTED] 800

[SQL] execute system command from storage procedure

2007-12-06 Thread Sabin Coanda
Hi there, Is it possible to execute a system command from a function ? (e.g. bash ) TIA, Sabin ---(end of broadcast)--- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq