Hello all together,
I have a database containing lots of large objects. Now I'd like to
compare large objects in my database and I thought of having a
function which creates a hashsum (MD5, SHA-1 or whatever) of my large
object, so I can use that in queries:
create function lo_md5(id oid) return
On Sun, Apr 08, 2007 at 07:03:17PM +0200, Dirk Jagdmann wrote:
> I have a database containing lots of large objects. Now I'd like to
> compare large objects in my database and I thought of having a
> function which creates a hashsum (MD5, SHA-1 or whatever) of my large
> object, so I can use that i
Hi Everybody,
I am using Postgres 8.1.0 and I have a requirement.
I have a table
create table weekly_tbl (id int, week_flag bit(7) not null default '111');
I want to create a function like this
create function week_func (int) returns weekly_tbl as
$$
select id,
s
On Sunday 08 April 2007 12:47 pm, Karthikeyan Sundaram wrote:
> Hi Everybody,
>
>I am using Postgres 8.1.0 and I have a requirement.
>
> I have a table
>
> create table weekly_tbl (id int, week_flag bit(7) not null default
> '111');
>
> I want to create a function like this
>
> create fu
Karthikeyan Sundaram <[EMAIL PROTECTED]> writes:
> I am getting an error message
> ERROR: function substr(bit, integer, integer) does not existHINT: No func=
> tion matches the given name and argument types. You may need to add explici=
> t type casts.CONTEXT: SQL function "week_func"
I think
Hello Michael,
this works like charm. Although I did fix the argument for lo_lseek:
CREATE OR REPLACE FUNCTION md5(id oid)
RETURNS text
as $$
DECLARE
fdinteger;
size integer;
hashval text;
INV_READ constant integer := 262144; -- 0x4 from libpq-fs.h
SEEK_SET constant int
On Mon, Apr 09, 2007 at 02:07:16AM +0200, Dirk Jagdmann wrote:
> this works like charm. Although I did fix the argument for lo_lseek:
Oops; thanks for fixing that.
> INV_READ constant integer := 262144; -- 0x4 from libpq-fs.h
You could also use a hex constant (the cast to integer is necess
Hi team,
I have a requirement like this.
create table valid_lovs (code_id int not null,lov_value int not null
,description varchar(256),status bit(1) not null default '1',constraint lov_pk
primary key (code_id,lov_value));
insert into valid_lovs (code_id,lov_value,description) values (1
Let me know your opinion about next way of processing and extracting data.
This would very comfortable for delivery xml-data into any program, for example
into browser.
Has this idea future ? What are you think ?
1. For exaple, you create SET:
create table a (
id num primary key;
data