On 12/22/2014 10:41 PM, Peter Eisentraut wrote:
On 12/22/14 7:56 PM, Andrew Dunstan wrote:
Currently the buildfarm animal crake (my development instance) is
running the bin check, but not any other animal. These tests still take
for too long, not least because each set of tests requires a
On 12/23/2014 11:11 AM, Andrew Dunstan wrote:
On 12/22/2014 10:41 PM, Peter Eisentraut wrote:
On 12/22/14 7:56 PM, Andrew Dunstan wrote:
Currently the buildfarm animal crake (my development instance) is
running the bin check, but not any other animal. These tests still take
for too long, not
Currently the buildfarm animal crake (my development instance) is
running the bin check, but not any other animal. These tests still take
for too long, not least because each set of tests requires a separate
install.
I have complained about this before, but we don't seem to have made any
On 12/22/14 7:56 PM, Andrew Dunstan wrote:
Currently the buildfarm animal crake (my development instance) is
running the bin check, but not any other animal. These tests still take
for too long, not least because each set of tests requires a separate
install.
You can avoid that by using make
Hi guys,
How would I go about implementing MySQL's BIN() function easily in PL/SQL.
mysql SELECT BIN(12);
- '1100'
Basically it converts a bigint to a string containing 1's and 0's.
I've tried messing about with bit() types, but those types lack casts to
text, etc. And they are left
here's a plperl version :-) :
create or replace function bin(bigint) returns text language plperl as $$
my $arg = $_[0] + 0;
my $res = ;
while($arg)
{
$res = ($arg % 2) . $res;
$arg = 1;
}
return $res;
$$;
cheers
andrew
Christopher Kings-Lynne wrote:
Hi guys,
How would I
On Tue, Nov 29, 2005 at 09:46:13PM -0500, Andrew Dunstan wrote:
create or replace function bin(bigint) returns text language plperl as $$
my $arg = $_[0] + 0;
my $res = ;
while($arg)
{
$res = ($arg % 2) . $res;
$arg = 1;
}
return $res;
$$;
Any reason not to use
create or replace function bin(bigint) returns text language plperl as $$
my $arg = $_[0] + 0;
my $res = ;
while($arg)
{
$res = ($arg % 2) . $res;
$arg = 1;
}
return $res;
$$;
Any reason not to use sprintf(%b, $_[0])?
All very well and good, but it has to be PL/SQL preferably or
On Tue, Nov 29, 2005 at 07:57:58PM -0700, Michael Fuhr wrote:
Any reason not to use sprintf(%b, $_[0])?
Or something like this in SQL or PL/pgSQL:
test= SELECT ltrim(textin(bit_out(12::bit(64))), '0');
ltrim
---
1100
(1 row)
--
Michael Fuhr
---(end of
Or something like this in SQL or PL/pgSQL:
test= SELECT ltrim(textin(bit_out(12::bit(64))), '0');
ltrim
---
1100
(1 row)
Swet. Good old i/o functions.
Chris
---(end of broadcast)---
TIP 6: explain analyze is your friend
Christopher Kings-Lynne [EMAIL PROTECTED] writes:
test= SELECT ltrim(textin(bit_out(12::bit(64))), '0');
ltrim
---
1100
(1 row)
Swet. Good old i/o functions.
Who needs the I/O functions? Just cast int to bit(n).
regards, tom lane
Tom Lane wrote:
Christopher Kings-Lynne [EMAIL PROTECTED] writes:
test= SELECT ltrim(textin(bit_out(12::bit(64))), '0');
ltrim
---
1100
(1 row)
Swet. Good old i/o functions.
Who needs the I/O functions? Just cast int to bit(n).
Then how do you remove all leading zeros,
Michael Fuhr wrote:
On Tue, Nov 29, 2005 at 09:46:13PM -0500, Andrew Dunstan wrote:
create or replace function bin(bigint) returns text language plperl as $$
my $arg = $_[0] + 0;
my $res = ;
while($arg)
{
$res = ($arg % 2) . $res;
$arg = 1;
}
return $res;
$$;
Any reason not
Am Mittwoch, den 30.11.2005, 10:15 +0800 schrieb Christopher
Kings-Lynne:
Hi guys,
How would I go about implementing MySQL's BIN() function easily in PL/SQL.
mysql SELECT BIN(12);
- '1100'
Basically it converts a bigint to a string containing 1's and 0's.
I've tried messing
On Wed, Nov 30, 2005 at 07:42:36AM +0100, Tino Wildenhain wrote:
In python, I usually go like this:
In Ruby (and therefore in PL/Ruby) you could do this:
10.to_s(2)
= 1010
10.to_s(16)
= a
--
Michael Fuhr
---(end of broadcast)---
TIP 4: Have
Am Mittwoch, den 30.11.2005, 00:03 -0700 schrieb Michael Fuhr:
On Wed, Nov 30, 2005 at 07:42:36AM +0100, Tino Wildenhain wrote:
In python, I usually go like this:
In Ruby (and therefore in PL/Ruby) you could do this:
10.to_s(2)
= 1010
10.to_s(16)
= a
is there a
16 matches
Mail list logo