Hi All,
I'm planning to have data in a tree structure when fetched.
e.g.
NODE1
+ --- NODE1_1
+ --- NODE1_2
|+ --- NODE1_2_1
+ --- NODE1_3
Is this possible? How?
I would really appreciate any help.
Sherwin
FROM test.pl of DBD-Pg-0.93.tar ...
# test large objects
# create large object from binary file
my ($ascii, $pgin);
foreach $ascii (0..255) {
$pgin .= chr($ascii);
};
my $PGIN = '/tmp/pgin';
open(PGIN, ">$PGIN") or die "can not open $PGIN";
print PGIN $pgin;
close
You can try the script I made for exporting all my Pg database.
Ideas were borrowed from pg_dumplo-0.0.5.
Make it sure that you have "Perl5 extension for PostgreSQL - Pg.pm"
installed.
sherwin
#!/usr/bin/perl -w
#
# Export large objects of all Pg database
# - Sherwin T. Daganato ([EMAIL PROTEC
xid loop detected, giving up
My observation: The tree (directories) were created but 1131 large objects
were not there.
The lo_dump.index file is not readable
(contains garbage).
peace,
sherwin
[EMAIL PROTECTED] writes:
>
>On Wed, 1 Nov 2000, pgsql-sql
Is it safe to rename 'postgres' to any__name?
like
update pg_shadow set usename = 'any__name' where usename = 'postgres';
Sherwin
SELECT is returning bogus data.
migrate=# select version();
version
---
PostgreSQL 7.0.3 on i686-pc-linux-gnu, compiled by gcc 2.95.3
(1 row)
migrate=# select userid from users where userid = '[EMAIL PROTECT
[EMAIL PROTECTED] writes:
>"pgsql-sql" <[EMAIL PROTECTED]> writes:
>> migrate=# select userid from users where userid = '[EMAIL PROTECTED]';
>>userid
>> -
>> [EMAIL PROTECTED]
>> admin
>> (2 rows)
&g
[EMAIL PROTECTED] writes:
>"pgsql-sql" <[EMAIL PROTECTED]> writes:
>> ERROR: copy: line 3910, Bad timestamp external representation
>'2000-01-05
>> 00:00:60.00+08'
>
>> Weird because those timestamps were generated by default now().
>
Thanks to you Tom and Thomas.
Now I know.
- sherwin
[EMAIL PROTECTED] writes:
>Ah ha (or rather, ha ha ha)! I'd suggest using the RPMs posted on the
>postgresql.org ftp site, which include a sample .rpmrc file which fixes
>disasterous bugs in Mandrake's default compiler settings for building
>RP
You can use 'DBI'
from test.pl of DBD::Pg
# create large object from binary file
my ($ascii, $pgin);
foreach $ascii (0..255) {
$pgin .= chr($ascii);
};
my $PGIN = '/tmp/pgin';
open(PGIN, ">$PGIN") or die "can not open $PGIN";
print PGIN $pgin;
close PGIN;
# begin transaction
$dbh->{AutoCo
you can also do it by a shell script
grantall.sh:
## start of grantall.sh ###
#!/bin/ash
SQL="SELECT relname FROM pg_class WHERE (relkind = 'r' OR relkind = 'S')
AND relname !~ '^pg_' ORDER BY relname"
OBJ=`psql -t -c "${SQL}" $1`
# OBJ=`echo ${OBJ} | sed 's/EOF//g'`
OBJ=`echo ${OBJ} | se
you can also do it by a shell script
grantall.sh:
## start of grantall.sh ###
#!/bin/ash
SQL="SELECT relname FROM pg_class WHERE (relkind = 'r' OR relkind = 'S')
AND relname !~ '^pg_' ORDER BY relname"
OBJ=`psql -t -c "${SQL}" $1`
# OBJ=`echo ${OBJ} | sed 's/EOF//g'`
OBJ=`echo ${OBJ} | se
Hello Everyone,
Here's my simple question.
I just want to know/get the recent changes made to a table.
Deeper? I wanted the Postgresql server to *publish* every
changes made to a table (similar to replication, incremental transfer,
etc.).
What is the best way to go about it?
My idea is to creat
Thanks Cedar, Jan, and Andy.
Actually the setup is something like this...
There are two remote servers-remoteA and remoteB.
The table of remoteA needs to be sychronized with the
table of remoteB all the time (well, there could be an interval).
remoteB will *publish* every changes and remoteA is *
Hi co-fanatics.
I am working on a small prove of concept, and am running into a small
obstacle. (the prove of concept showing, amongs other things, that doing
calculations on a database works well, and that it is possible to let it
run 'jobs')
Considder the following stored procedure:
For rea
HI!
The SQL below is too slow.
SELECT name FROM office, office_application
WHERE code = office_code
AND name NOT IN
(SELECT DISTINCT name FROM office, office_application
WHERE active = 't' AND code = office_code);
Can anyone tell me how to optimize it?
Thanks.
[EMAIL PROTECTED] writes:
>How does the output of the above differ from:
>
>SELECT name FROM office, office_application
>WHERE code = office_code
>AND active != 't';
>
>Without knowing the table structures (which tables to active, code,
>and office_code belong to?) it's hard to suggest much els
17 matches
Mail list logo