Hi,I've made a client and a server program in C using socket library.The client is in the postgres database server and Server is on some other machine.My goal is to compile the client as a shared object, load it dynamically in postgres (in a function), execute that postgres function in which this
I've made a client and a server program in C using socket library.
My goal is to compile the client as a shared object, load it
dynamically in postgres (in a function), execute that
postgres function in which this shared library (client) is
dynamically loaded and connect to the server
Hi,
I want to split a table to 2 small tables. The 1st one contains 60% records which are randomly selected from the source table.
How to do it?
Regards,
Felix
Hi all,
I'm a newbie of PostgreSQL. I'm searching materials about porting from Oracle to PostgreSQL.
Anyone can share with me some good documatations?
Thanks and regards,
Felix
Felix Zhang [EMAIL PROTECTED] schrieb:
Hi,
I want to split a table to 2 small tables. The 1st one contains 60% records
which are randomly selected from the source table.
How to do it?
Why do you want to do this?
Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a
Felix Zhang [EMAIL PROTECTED] schrieb:
Hi all,
I'm a newbie of PostgreSQL. I'm searching materials about porting from Oracle
to PostgreSQL.
Anyone can share with me some good documatations?
http://techdocs.postgresql.org/#convertfrom
Andreas
--
Really, I'm not out to destroy Microsoft.
On 17.10.2006 10:36 Andreas Kretschmer wrote:
http://techdocs.postgresql.org/#convertfrom
I just noticed that the link Porting from Oracle PL/SQL still points
to the 7.4 manuals. Shouldn't that be updated to point to the current
release?
And the link Ora2Pg - Oracle to PostgreSQL
Can we convert from Postgres to Oracle !!???
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
Perhaps something like:
CREATE TABLE foo2 AS SELECT * FROM foo WHERE (rand() = 0.60);
?
HTH,
Greg Williamson
DBA
GlobeXplorer LLC
-Original Message-
From: [EMAIL PROTECTED] on behalf of Andreas Kretschmer
Sent: Tue 10/17/2006 1:34 AM
To: pgsql-general@postgresql.org;
to do some statistics analysis.
2006/10/17, Andreas Kretschmer [EMAIL PROTECTED]:
Felix Zhang [EMAIL PROTECTED] schrieb:
Hi, I want to split a table to 2 small tables. The 1st one contains 60% records which are randomly selected from the source table. How to do it?Why do you want to do this?
Felix Zhang wrote:
Hi all,
I'm a newbie of PostgreSQL. I'm searching materials about porting from
Oracle to PostgreSQL.
Anyone can share with me some good documatations?
Thanks and regards,
Felix
A quick search of pgfoundry finds
http://pgfoundry.org/projects/orafce/
which may help.
Hello,
I've got a failing sql-Script that I execute with the psql command. The
Script contains:
8-
SET CLIENT_ENCODING = 'LATIN1';
(Some other statements)
CREATE TABLE public.init_camera_type (
id_camera_type SMALLINT NOT NULL,
Hallo Stefan,
Stefan Sassenberg wrote:
Hello,
I've got a failing sql-Script that I execute with the psql command. The
Script contains:
I've been unable to reproduce the error with just that snippet (on
debian with PostgreSQL 8.1.4). Can you provide a stripped down test case?
Hallo Markus,
Markus Schiltknecht wrote:
Hallo Stefan,
Stefan Sassenberg wrote:
Hello,
I've got a failing sql-Script that I execute with the psql command.
The Script contains:
I've been unable to reproduce the error with just that snippet (on
debian with PostgreSQL 8.1.4). Can you
am Tue, dem 17.10.2006, um 10:44:52 +0200 mailte Thomas Kellerer folgendes:
On 17.10.2006 10:36 Andreas Kretschmer wrote:
http://techdocs.postgresql.org/#convertfrom
I just noticed that the link Porting from Oracle PL/SQL still points
to the 7.4 manuals. Shouldn't that be updated to
On Tue, Oct 17, 2006 at 03:39:21PM +0800, Felix Zhang wrote:
I want to split a table to 2 small tables. The 1st one contains 60%
records which are randomly selected from the source table. How to do
it?
i do my A/B-Group splitting usually by 1 the serial of the table.
assuming, that there are
I would do
select * into mynewtable
frommyoldtableORDER by random() LIMIT 15000
where 15000 in this case is your table row
count*.6
If you want to create another table with 40% of the
remaining data then something like
select * into mynewtable2 from myoldtable where
Stefan Sassenberg wrote:
Hello,
I've got a failing sql-Script that I execute with the psql command. The
Script contains:
8-
SET CLIENT_ENCODING = 'LATIN1';
snip
The database that script is applied to is UTF8 encoded.
Stefan
Hello Shane,
Shane Ambler wrote:
Stefan Sassenberg wrote:
Hello,
I've got a failing sql-Script that I execute with the psql command.
The Script contains:
8-
SET CLIENT_ENCODING = 'LATIN1';
snip
The database that script is applied
Hi,
The POSIX timezone notation as understood by the zic code includes
the possibility of
zoneabbrev[+-]hh[:mm[:ss]]
but the meaning is that hh:mm:ss *is* the offset from GMT, and
zoneabbrev is being defined as the abbreviation for that offset.
What the datetime.c code is doing is trying to
On 10/17/06, Leonel Nunez [EMAIL PROTECTED] wrote:
Correction to my prior mail
do this as root :
chcon system_u:object_r:postgresql_db_t /opt/home/pgdata/mspace
When you need to know what config has any directory for SELinux
do a:
ls -lZ /your/dir
and if you need /your/otherdir
Sandeep Kumar Jakkaraju wrote:
Can we convert from Postgres to Oracle !!???
Umm, this would be the wrong forum for that.
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 10/17/06 03:51, Sandeep Kumar Jakkaraju wrote:
Can we convert from Postgres to Oracle !!???
Are you asking permission?
- --
Ron Johnson, Jr.
Jefferson LA USA
Is common sense really valid?
For example, it is common sense to white-power racists
Sandeep Kumar,
Can we convert from Postgres to Oracle !!???
technically: partial. Oracle supports most of the bleeding edge
enterprise features of PostgreSQL. There are some limits however, esp.
concerning inheritance, arbitrary length text fields and especially
the missing support for
On Oct 16, 2006, at 16:17 , Madison Kelly wrote:
Alvaro Herrera wrote:
Jochem van Dieten wrote:
Scott Marlowe wrote:
While all the talk of a hinting system over in hackers and
perform is
good, and I have a few queries that could live with a simple
hint system
pop up now and again, I keep
Felix,
You might want to look at EnterpriseDB, which is PostgreSQL with
Oracle compatibility extensions.
www.enterprisedb.com
LewisC
--- Felix Zhang [EMAIL PROTECTED] wrote:
Hi all,
I'm a newbie of PostgreSQL. I'm searching materials about porting
from
Oracle to PostgreSQL.
Anyone can
Ron Johnson [EMAIL PROTECTED] writes:
~$ touch /data/02/share/database/testing.testing
~$ dir /data/02/share/database
total 8
drwxrwxr-x 2 me postgres 4096 2006-10-16 21:53 ./
drwxrwxr-x 16 me people 4096 2006-10-16 21:38 ../
-rw-r--r-- 1 me me 0 2006-10-16 21:53 testing.testing
Stefan Sassenberg [EMAIL PROTECTED] writes:
PANIK: ERRORDATA_STACK_SIZE exceeded
server closed the connection unexpectedly
What LC_CTYPE and LC_MESSAGES settings are you using? We've seen
problems of this ilk when gettext() produces messages encoded in the
wrong encoding (ie, not what the
Hello Tom,
Tom Lane wrote:
Stefan Sassenberg [EMAIL PROTECTED] writes:
PANIK: ERRORDATA_STACK_SIZE exceeded
server closed the connection unexpectedly
What LC_CTYPE and LC_MESSAGES settings are you using? We've seen
problems of this ilk when gettext() produces messages encoded in the
wrong
Stefan Sassenberg [EMAIL PROTECTED] writes:
Tom Lane wrote:
What LC_CTYPE and LC_MESSAGES settings are you using? We've seen
problems of this ilk when gettext() produces messages encoded in the
wrong encoding (ie, not what the database encoding is).
postgresql.log says [...] [EMAIL
AgentM wrote:
Alvaro's advice is sound. If the patent holder can prove that a
developer looked at a patent (for example, from an email in a mailing
list archive) and the project proceeded with the implementation
regardless, malice can been shown and damages can be substantially
higher. You're
On 10/17/06, Madison Kelly [EMAIL PROTECTED] wrote:
AgentM wrote: Alvaro's advice is sound. If the patent holder can prove that a developer looked at a patent (for example, from an email in a mailing list archive) and the project proceeded with the implementation
regardless, malice can been shown
Hello all,
I have
user information in a table that I want to use to add users to the user roles
tables that are part of postgresql. My question is this: the passwords in my
user table are in there as a text file with the data being encrypted using the
crypt function, is there a way I can
Brian Mathis wrote:
I also am NAL, but I know enough about the patent system (in the US) to
know that ignorance *IS* a defense. If you are ignorant of the patent,
you only have to pay the damages. If you knew about the patent and did
it anyway, you have to pay *triple* damages. Ignorance
It seems that PG uses the PGDATA directory even for operations
that affect databases on different tablespaces. For example, when
an index is created on a table that is in tablespace TS, the
index ends up in TS (as it should), but first a temporary
file (with size comparable to the final index) is
We just tar/gzip the entire data directory.
It takes all of 20 sec. We've successfully restored from that
also. The machine you are restoring to *must* be running the save
version of postgresql you backed up from.
Matthew Engel
Jeff Davis [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
Tom Lane wrote:
Stefan Sassenberg [EMAIL PROTECTED] writes:
Tom Lane wrote:
What LC_CTYPE and LC_MESSAGES settings are you using? We've seen
problems of this ilk when gettext() produces messages encoded in the
wrong encoding (ie, not what the database encoding is).
postgresql.log says
Stefan Sassenberg [EMAIL PROTECTED] writes:
[EMAIL PROTECTED] is ISO-8859-15, if that helps. I changed the locale to
en_US.UTF-8 and LC_CTYPE in the environment is set to that value too.
Nevertheless show lc_ctype says [EMAIL PROTECTED], even after a postgresql
restart. How can I change
On Tue, Oct 17, 2006 at 04:56:09PM +0200, Andras Simon wrote:
As a more drastic example: I created a DB on a tablespace TS, and
copied a 25 MB file into one of its tables. I ended up having 60
MB of extra data in $PGDATA/pg_xlog that doesn't go away even
after dropping the database.
The xlog
On 10/17/06, Madison Kelly [EMAIL PROTECTED] wrote:
Brian Mathis wrote: I also am NAL, but I know enough about the patent system (in the US) to know that ignorance *IS* a defense.If you are ignorant of the patent, you only have to pay the damages.If you knew about the patent and did
it anyway,
[EMAIL PROTECTED] writes:
We just tar/gzip the entire data directory. It takes all of 20 sec. We've
successfully restored from that also.
You've been very lucky ... unless you stopped the postmaster while
taking the backup. Without that, this method WILL screw you someday.
(But as long as
Hello,
Lets suppose I have a table like this one
id id_1id_2 date_time
1 101 10002006-07-04 11:25:43
2 102 10012006-07-04 11:26:43
3 101 10052006-07-04 11:27:43
4 103 10002006-07-04 11:25:43
I want to find all records have same
Colour me funny, but wouldn't staying out of the courts in the first
place not be the best option?
Yes, however some people feel that given the way the patent office is
spewing huge quantities of patents, many on old well-known techniques, and
the the absurd difficulty of reading patent claims,
Madison Kelly wrote:
Brian Mathis wrote:
I also am NAL, but I know enough about the patent system (in the US) to
know that ignorance *IS* a defense. If you are ignorant of the patent,
you only have to pay the damages. If you knew about the patent and did
it anyway, you have to pay
idid_1id_2 date_time
1 101 10002006-07-04 11:25:43
I want to find all records have same id_1, but different id_2 and have
difference in time less than 5 minutes.
In this case this is record 1 and record 3.
How can I do this ?
I am sure that this will need some tuning
Alvaro Herrera wrote:
Yeah. I invite you to do all the extra (useless) development work
required. But please do not charge other people with it. Whoever
investigates patents and lets pgsql-hackers know about them, is charging
the Postgres community with that work. We sure don't need it.
As
On 10/17/06, Martijn van Oosterhout kleptog@svana.org wrote:
On Tue, Oct 17, 2006 at 04:56:09PM +0200, Andras Simon wrote:
As a more drastic example: I created a DB on a tablespace TS, and
copied a 25 MB file into one of its tables. I ended up having 60
MB of extra data in $PGDATA/pg_xlog
On Tue, Oct 17, 2006 at 05:54:42PM +0200, Andras Simon wrote:
The xlog is not split by database, all databases share the same xlog.
OK, I see. The question then is how far does it grow. If its size is
comparable to that of the actual data, then having separate
tablespaces is not as useful as
On 10/17/06, Martijn van Oosterhout kleptog@svana.org wrote:
xlogs are recycled. You can control the growth somewhat by playing with
the xlog settings in the config. It should stabilise at about 16MB
times the wal segments.
This is very good news! Thanks,
Andras
On Tue, 2006-10-17 at 10:41 -0400, DEV wrote:
Hello all,
I have user information in a table that I want to use to add
users to the user roles tables that are part of postgresql. My
question is this: the passwords in my user table are in there as a
text file with the data being
Okay but the issue I have is that I have the passwords already generated and
in crypt() format and would love to just use them if at all possible?
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Jeff Davis
Sent: Tuesday, October 17, 2006 12:36 PM
To: DEV
Sander Steffann [EMAIL PROTECTED] writes:
What the datetime.c code is doing is trying to find the zoneabbrev
in a built-in timezone table, and then adding the two together.
This is simply wacko.
I think that if anyone has ever tried to use this notation they would have
noticed this
Hi,
Sander Steffann [EMAIL PROTECTED] writes:
What the datetime.c code is doing is trying to find the zoneabbrev
in a built-in timezone table, and then adding the two together.
This is simply wacko.
I think that if anyone has ever tried to use this notation they would
have
noticed this
On Oct 17, 2006, at 10:46 , Madison Kelly wrote:
Brian Mathis wrote:
I also am NAL, but I know enough about the patent system (in the
US) to know that ignorance *IS* a defense. If you are ignorant of
the patent, you only have to pay the damages. If you knew about
the patent and did it
Tom Lane wrote:
Alexandre Arruda [EMAIL PROTECTED] writes:
But pg_stat_activity joined with pg_locks only give me informations
about the lock itself.
Realy, I want a (possible) simple information: Who is locking me ?
You need a self-join to pg_locks to find the matching lock that is held
On Tue, 2006-10-17 at 12:54 -0400, DEV wrote:
Okay but the issue I have is that I have the passwords already generated and
in crypt() format and would love to just use them if at all possible?
PostgreSQL won't doesn't recognize crypt passwords, as far as I know.
That means that it's pretty
On Oct 17, 2006, at 10:43 AM, [EMAIL PROTECTED] wrote:We just tar/gzip the entire data directory. It takes all of 20 sec. We've successfully restored from that also. The machine you are restoring to *must* be running the save version of postgresql you backed up from. If you successfully backed
Jeff Davis wrote:
On Tue, 2006-10-17 at 10:41 -0400, DEV wrote:
Hello all,
I have user information in a table that I want to use to add
users to the user roles tables that are part of postgresql. My
question is this: the passwords in my user table are in there as a
text file with the
Vivek,What methods of backup do you recommend for medium to large databases? In our example, we have a 20GB database and it takes 2 hrs to load from a pg_dump file.Thanks.Steve Poe
On 10/17/06, Vivek Khera [EMAIL PROTECTED] wrote:
On Oct 17, 2006, at 10:43 AM, [EMAIL PROTECTED] wrote:
We just
On Oct 17, 2006, at 2:35 PM, Steve Poe wrote:
Vivek,
What methods of backup do you recommend for medium to large
databases? In our example, we have a 20GB database and it takes 2
hrs to load from a pg_dump file.
my largest db is about 60Gb with indexes. reloading the data (about
On Tue, 2006-10-17 at 10:24 -0400, Madison Kelly wrote:
Nor am I a lawyer, but I still hold that hoping ignorance will be a
decent defense is very, very risky. In the end I am not a pgSQL
developer so it isn't in my hands either way.
If I may.
The hoping, ignorance will save you line of
Shane Ambler [EMAIL PROTECTED] writes:
What Dev would want to look for (probably create) is a small script that will
read his list of crypt passwords and un-crypt them into a create role string
that is fed to psql.
Except that the hash used is unidirectional, i.e., there's no way to decrypt
Hi,
I've written some PostgreSQL C functions which expose the functionality
of Theodore Ts'o's UUID library. I need to add a few sanity clauses
here and there, but working (mostly) code can be found here:
http://www.yellowbank.com/code/PostgreSQL/uuid/
I have one problem. My y_uuid_time
Jorge Godoy wrote:
Shane Ambler [EMAIL PROTECTED] writes:
What Dev would want to look for (probably create) is a small script that will
read his list of crypt passwords and un-crypt them into a create role string
that is fed to psql.
Except that the hash used is unidirectional, i.e., there's
Shane Ambler [EMAIL PROTECTED] writes:
The only crypt I know of is the crypt command (FreeBSD has it at
/usr/bin/crypt) and is also known as enigma. This is a two way encryption
and is fast.
If that is what he is using then decrypting will not be part of the time
issue and is the basis of
Merlin Moncure wrote:
SELECT * FROM TABLE ORDER BY pk LIMIT 10 OFFSET N;
using offset to walk a table is extremely poor form because of:
* poor performance
* single user mentality
* flat file mentality
databases are lousy at this becuase they inheritly do not support
abolute
Karen Hill wrote:
I have 8.2 Beta 1 (Win32) on my home pc and offset was faster than
fetching relative to the last key as measured by explain analyze. This
was on a table with about 1,000 rows.
For such a small table the difference is probably irrelevant. Try with
several million rows.
Hmm. If the messages are less than PIPE_BUF bytes long (4096 bytes on
Linux) then the writes are supposed to be atomic. Can you
check whether
the interspersal cases involve messages whose total length (all lines)
exceeds 4K?
Tom,
Some of them involve long messages (4K), but there are
Hi all, looking for a method to number a table sequentially, but the
sequence only increments if the value in a certain column is
different. as in
seq| parish
1 | Kingston
1 | Kingston
1 | Kingston
1 | Kingston
2 | Lucea
3 | Morant
George Pavlov [EMAIL PROTECTED] writes:
Hmm. If the messages are less than PIPE_BUF bytes long (4096 bytes on
Linux) then the writes are supposed to be atomic.
Some of them involve long messages (4K), but there are many that do not
(like the ones I had posted at the start of this thread).
On Mon, Oct 16, 2006 at 11:41:25AM +0200, Ivan Sergio Borgonovo wrote:
You can put a unique constraint and a serial default on the
parent table (such as a primary key). Insertion on a child
table will fail if the key in question already exists in the
base table. It may have come from
Jorge Godoy wrote:
Shane Ambler [EMAIL PROTECTED] writes:
The only crypt I know of is the crypt command (FreeBSD has it at
/usr/bin/crypt) and is also known as enigma. This is a two way encryption
Well... I suppose DES is not Enigma, but I may be wrong. I just quoted this
extension because
On Oct 17, 2006, at 23:18 , Rhys Stewart wrote:
Hi all, looking for a method to number a table sequentially, but the
sequence only increments if the value in a certain column is
different. as in
[snip]
Normalization could solve your problem and also improve your schema:
-- The parish table
[EMAIL PROTECTED] (Rhys Stewart) writes:
Hi all, looking for a method to number a table sequentially, but the
sequence only increments if the value in a certain column is
different. as in
seq| parish
1 | Kingston
1 | Kingston
1 | Kingston
1
We're a little puzzled by this (apparently) strange behavior, and would
be curious to know what you folks make of it. Thanks.
Ken
CREATE TABLE foo (
foo_field integer );
CREATE TABLE par(
par_field integer );
SELECT VERSION();
SELECT foo_field FROM par;
SELECT foo_field FROM
On þri, 2006-10-17 at 15:58 -0700, Ken Tanzer wrote:
We're a little puzzled by this (apparently) strange behavior, and would
be curious to know what you folks make of it. Thanks.
not sure exactly what you are referring to, but:
(rearranged quotes to group output with SQL)
SELECT foo_field
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hi,
PG 8.1.5
The closed-source RDBMS that we are hoping to archive on PostgreSQL
8.1.5 has fixed-point scalars, where the data is *stored* as a plain
old scalar, but is run-time *interpreted* as having a decimal point.
For example:
SMALLINT(2)
On Tue, Oct 17, 2006 at 03:25:05PM -0400, Ron Peterson wrote:
I've written some PostgreSQL C functions which expose the functionality
of Theodore Ts'o's UUID library. I need to add a few sanity clauses
here and there, but working (mostly) code can be found here:
HiI would like to know that what can be the maximum size of database in postgres 8.1.4. Currently my database size is 37GB its prettyslow. I wonder if its b'cos of huge amount of data in it.Thanks in advance. Roopa
How low will we go? Check out Yahoo! Messengers low PC-to-Phone call
On Oct 18, 2006, at 9:46 AM, Ron Johnson wrote:
SMALLINT(2)
INTEGER(2)
BIGINT(2)
Are these data-types not in PG, or am I missing something?
http://www.postgresql.org/docs/current/interactive/
datatype.html#DATATYPE-NUMERIC
The docs list 2 byte, 4 byte, and 8 byte integer types.
On Tue, Oct 17, 2006 at 07:26:25PM -0700, roopa perumalraja wrote:
I would like to know that what can be the maximum size of database in
postgres 8.1.4.
http://www.postgresql.org/docs/faqs.FAQ.html#item4.4
Currently my database size is 37GB its pretty slow. I wonder if
its b'cos of huge
roopa perumalraja wrote
I would like to know that what can be the maximum size of database in
postgres 8.1.4. Currently my database size is 37GB its pretty slow.
I wonder if its b'cos of huge amount of data in it.
http://www.postgresql.org/docs/faqs.FAQ.html#item4.4
Slowness reason
Rhys,
You could create a sequence, then make the seq attribute to your table
have a default value of:
seq integer default nextval('your_sequence')
Then every time an insert is done into your table, the seq will
increment. You alternatively could make your insert statement have
for that
HiCurrently my database size is 38GB and it is pretty slow in whatever I do with it like take a backing up, vaccuming, reindexing, running all queries. Why is that? Is it possible to improve the performance.Thanks in advance Roopa
Yahoo! Messenger with Voice. Make PC-to-Phone Calls
Please do not simply repost your obscure and almost meaningless original
question.
Please respond to the earlier posts asking for more information. People might
be willing to help, but they can't unless you respond to them.
Greg Williamson
DBA
GlobeXplorer LLC
-Original Message-
Hi All
Is there any inbuilt facility in postgres for connection pooling .. ??
Thanks
-
sandeep
---(end of broadcast)---
TIP 4: Have you searched our list archives?
http://archives.postgresql.org/
Hi All
Is Postgres good for large Applications ??
I mean where we have to make many simulataneous connections...
Thanks
Sandeep
---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings
Is your server capable? Does it have enough resources to handle many
connections?
many = ??? 100, 200, 1,000,000,000 are they concurrent users?
'good for large applications' = ??? I'd say, how large your
application is doesn't matter, right... cause that's the front end. How
Tom == Tom Lane [EMAIL PROTECTED] writes:
Tom The weird thing about this allegedly-POSIX notation is the combination
Tom of a symbolic name and a further offset from it.
AIUI, it is not a further offset but rather (mostly-)redundant data
specifying the exact offset from UTC¹ the text tz
89 matches
Mail list logo