2011/3/24 Nick Raj :
> If Datum contains only the value (not having type specific info.), then
> Suppose i want to print the Datum V value (already defined in postgres)
> then printf("%??", V);
>
> Because V is assigned by PG_GETARG_POINTER(1);
> I don't having the information of type Datum.
>
> Ho
If Datum contains only the value (not having type specific info.), then
Suppose i want to print the Datum V value (already defined in postgres)
then printf("%??", V);
Because V is assigned by PG_GETARG_POINTER(1);
I don't having the information of type Datum.
How to print the value of Datum in po
On Wed, Mar 23, 2011 at 14:08, Merlin Moncure wrote:
> On Wed, Mar 23, 2011 at 9:04 AM, dennis jenkins
> wrote:
>> On Wed, Mar 23, 2011 at 5:08 AM, Adrian Schreyer wrote:
>>>
>>> you are right, it returns a char *.
>>>
>>> The prototype:
>>>
>>> char *function(bytea *b);
>>>
>>> The actual C++ f
Hi Guys,
I tried to setup kerberos authentication with postgresql 8.4.7 on Ubuntu 10.10.
When I use:
$ psql –h ubuntu.server –U gavin dbname
I get following error:
psql: Kerberos 5 authentication not supported.
And from the server side of postgresql, I could see following log:
2011-03-23 09:1
Nick Raj Wednesday 23 March 2011 18:45:41
> Hi,
> I am understanding the postgres code. In code, i just want to see what are
> values that are passing through the variables?
> Can you please tell me if the variable is of type Datum, then how to print
> its value? Because i dont the variable v type
i guess an array is also ok. must been something like:
fn_get_subsamples(IN sample_numbers[] integer) ??
how would a query then look like?
SELECT * FROM sample WHERE sample_number IN ( fn_get_subsamples(1,2,3,4)
) ??
cheers sven
Am 23.03.2011 17:42, schrieb Tom Lane:
"Sven Haag" writes
On 23/03/11 20:18, John R Pierce wrote:
On 03/22/11 11:18 PM, Toby Corkindale wrote:
Hi,
I wondered if there were any software packages floating around to
manage servers using streaming replication with Pg?
ie. To handle failing over and adjusting the config to promote a
slave; and performing t
You are right to the point, Tom.
The datex is timestamp with time zone and the constraints were created as
timestamp without time zone.
As soon as I fixed that , it all started working.
thank you!
Helen
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/constraint-partition
I think I understand what is happening but am curious if something along
these lines can be accomplished?
Consider the following SQL statement (executed via JDBC against a 9.0.3
installation):
DO $$ BEGIN PERFORM someexistingfunction ( ? ); END; $$
It appears that such a format is invalid since J
On mån, 2011-03-21 at 11:22 +0100, Durumdara wrote:
> The language is Windows 1250 (ISO-8859-2).
>
> I remembered that when I tried in 8.1 to create database as same in Windows:
>
> CharSet: Win1250
> Collation: - (disabled, and it is handled as HUN - iso-8859-2)
>
> then I failed.
>
> Because
hyelluas writes:
> sorry, my table has many columns and missed the datex when make it look
> smaller.
> datex is the column in the table. This is the driving constraint.
> My task is to have 30 days of data with 5mln to 10 mln rec in 1 hour table,
> so I partition it by hour table and combine the
On Wed, Mar 23, 2011 at 10:29 AM, Sven Haag wrote:
> hello pgsql fans out there,
>
> i've already created a function that returns a list of IDs of all sub-samples
> based on a given sample ID. this works fine. now i like to extend this
> function so that it can receive a list of sample IDs. e.g.
Hi,
The first PostgreSQL Session organized by Dalibo last february was
a big success. More than 80 public and private participants gathered in
Paris.
Dalibo and Oslandia want to carry on this success and set up a
new conference day dedicated to PostGIS, on June 23d in Paris.
http://www.postgresq
Nick Raj writes:
> In postgres, typedef uintptr_t Datum
> Datum is getting value from PG_GETARG_POINTER(1);
> But, now problem is how would i know the type of PG_GETARG_POINTER(1)
> (postgres internally pass this argument) to figure out datum type?
Datum does not carry any type information, only
On Wed, Mar 23, 2011 at 4:01 PM, Emi Lu wrote:
> A question about saving PDF (size around 160kb) into postgresql large object
> columns vs. saving into a directory.
>
> May I know the performance differences? Pros and crons please?
>
> Each year, 20 new pdfs will be saved into DB (each around 160K
Hi,
In postgres, typedef uintptr_t Datum
Datum is getting value from PG_GETARG_POINTER(1);
But, now problem is how would i know the type of PG_GETARG_POINTER(1)
(postgres internally pass this argument) to figure out datum type?
Can you tell detailed structure of Datum, so i can print the value?? H
On Wed, Mar 23, 2011 at 04:05:44PM -0400, Bill Moran wrote:
> We store a WHOLE lot more binary data in our DBs than that. The
> big advantage to us is that we store the data in TEXT fields, and
> use Slony to replicate it, so in the event of hardware failure, we
> don't have to worry about the DB
On Wed, 2011-03-23 at 16:01 -0400, Emi Lu wrote:
>
> A question about saving PDF (size around 160kb) into postgresql large
> object columns vs. saving into a directory.
>
> May I know the performance differences? Pros and crons please?
>
> Each year, 20 new pdfs will be saved into DB (each arou
In response to Emi Lu :
> Hello list,
>
> A question about saving PDF (size around 160kb) into postgresql large
> object columns vs. saving into a directory.
>
> May I know the performance differences? Pros and crons please?
>
> Each year, 20 new pdfs will be saved into DB (each around 160KB).
Hello list,
A question about saving PDF (size around 160kb) into postgresql large
object columns vs. saving into a directory.
May I know the performance differences? Pros and crons please?
Each year, 20 new pdfs will be saved into DB (each around 160KB).
Thanks a lot!
Emi
--
Sent via pgsql-
2011/3/23 Vick Khera :
> 2011/3/23 Martín Marqués :
>> The second error is very curious, as it looks like pg_dump changed 1
>> for a 'q' in an integer field:
>>
>> psql:siprebi-bu.sql:2219245: ERROR: la sintaxis de entrada no es
>> válida para integer: «q721695»
>> CONTEXT: COPY objeto_datos_rep,
On Wed, Mar 23, 2011 at 08:08:47PM +0100, Alban Hertroys wrote:
> er or motherboard? Maybe the new drive has different requirements than the
> old one had (more power, for example)?
Or a newer but backward-plug-compatible interface? Often, the new
drive in the old plug only uses the Right Featur
On 23 Mar 2011, at 9:33, Merrick wrote:
> Backups used to take 25 minutes, and now take 110 minutes, before
> replacing the drive it became clear the backup was not going to finish
> since in 120 minutes it had only finished 200mb of 2.8gb.
A few obvious questions:
1. Are you sure you replaced th
2011/3/23 Pavel Stehule :
> Hello
>
> SPI_finish try to release resources and memory. Maybe you has broken memory.
>
> Try to compile postgres with --enable-debug and --enable-cassert
> flags. You can take more info from core dump.
>
> Regards
>
> Pavel Stehule
>
Hello Pavel,
I'm using a precompi
Hello
SPI_finish try to release resources and memory. Maybe you has broken memory.
Try to compile postgres with --enable-debug and --enable-cassert
flags. You can take more info from core dump.
Regards
Pavel Stehule
2011/3/23 Jorge Arévalo :
> Hello,
>
> I'm writing my own C-function on server
Hello,
I'm writing my own C-function on server side, to extend SQL. One of my
function's arguments is any valid PostgreSQL expression returning a
number. Another argument is a specific data type (RASTER type). So, if
I execute this function against a table with 1000 rows, each row
having one RASTE
Thank you Merlin, I had my suspicions about the hardware as well.
The backup server is blazing fast, it is definitely
"time to ramble on..."
On Mar 23, 7:11 am, mmonc...@gmail.com (Merlin Moncure) wrote:
> On Wed, Mar 23, 2011 at 3:33 AM, Merrick wrote:
> > Hi,
>
> > I am looking for some advic
Hi,
I am understanding the postgres code. In code, i just want to see what are
values that are passing through the variables?
Can you please tell me if the variable is of type Datum, then how to print
its value? Because i dont the variable v type.
And also what the structure of Datum?
Thanks,
Raj
On 03/23/2011 10:33 AM, Martín Marqués wrote:
El día 23 de marzo de 2011 14:03, Adrian Klaver
escribió:
On 03/23/2011 07:56 AM, Martín Marqués wrote:
Ok, did a remote dump (from the development server which has pg 8.4)
and I got a similar error:
psql:siprebi-bu.sql:27374: ERROR: sintaxis
2011/3/23 Martín Marqués :
> The second error is very curious, as it looks like pg_dump changed 1
> for a 'q' in an integer field:
>
> psql:siprebi-bu.sql:2219245: ERROR: la sintaxis de entrada no es
> válida para integer: «q721695»
> CONTEXT: COPY objeto_datos_rep, línea 991894, columna codigo:
i guess an array is also ok. must been something like:
fn_get_subsamples(IN sample_numbers[] integer) ??
how would a query then look like?
SELECT * FROM sample WHERE sample_number IN ( fn_get_subsamples(1,2,3,4)
) ??
cheers sven
Am 23.03.2011 17:42, schrieb Tom Lane:
"Sven Haag" write
El día 23 de marzo de 2011 14:03, Adrian Klaver
escribió:
> On 03/23/2011 07:56 AM, Martín Marqués wrote:
>>
>>
>> Ok, did a remote dump (from the development server which has pg 8.4)
>> and I got a similar error:
>>
>> psql:siprebi-bu.sql:27374: ERROR: sintaxis de entrada no
>> vlida para tipo b
sorry, my table has many columns and missed the datex when make it look
smaller.
datex is the column in the table. This is the driving constraint.
My task is to have 30 days of data with 5mln to 10 mln rec in 1 hour table,
so I partition it by hour table and combine them into days, which are
combi
On 03/23/2011 07:56 AM, Martín Marqués wrote:
El día 23 de marzo de 2011 11:18, Adrian Klaver
escribió:
On Wednesday, March 23, 2011 6:57:35 am Martín Marqués wrote:
Now I'm getting weirder things. I did a pg_dump with -d option and the
dump adds strange caracters:
As previously stated
2011/3/23 Andy Chambers :
> Hi All,
>
> In a trigger function, I'm trying to set the variable "pkey" to be one of
> the columns
> in the automatic variable "NEW". Which one depends on some metadata that is
> available at
> run-time. I'm having a hard time using an automatic variable in a dynamic
Hi All,
In a trigger function, I'm trying to set the variable "pkey" to be one of
the columns
in the automatic variable "NEW". Which one depends on some metadata that
is available at
run-time. I'm having a hard time using an automatic variable in a dynamic
execute command.
I get the err
"Sven Haag" writes:
> hello pgsql fans out there,
> i've already created a function that returns a list of IDs of all sub-samples
> based on a given sample ID. this works fine. now i like to extend this
> function so that it can receive a list of sample IDs. e.g.:
> fn_get_subsamples(IN sample_
On Wed, Mar 23, 2011 at 14:08, Merlin Moncure wrote:
> On Wed, Mar 23, 2011 at 9:04 AM, dennis jenkins
> wrote:
>> On Wed, Mar 23, 2011 at 5:08 AM, Adrian Schreyer wrote:
>>>
>>> you are right, it returns a char *.
>>>
>>> The prototype:
>>>
>>> char *function(bytea *b);
>>>
>>> The actual C++ f
hello pgsql fans out there,
i've already created a function that returns a list of IDs of all sub-samples
based on a given sample ID. this works fine. now i like to extend this function
so that it can receive a list of sample IDs. e.g.:
fn_get_subsamples(IN sample_numbers SETOF integer)
here
Here is the explain plan of the new query (same as original but with changes to
the Date subquery to use ::date instead of to_char to truncate the time
portion), when it is run after doing these 2 sets first:
set work_mem='8MB';
set enable_nestloop = false;
explain plan (8.4): http://explain.
Given what you just describe I would probably associate a new primary key for
each sub-type and link to “parent_account”. The polymorphism aspect is fairly
severe that using a shared PK is likely to be more confusing than helpful.
From: salah jubeh [mailto:s_ju...@yahoo.com]
Sent: Wednesday
It is a user accounts, which might then become customer accounts, accounting
accounts, etc. I will use specialization and generalization concepts in
database. I did not complete the design analyses but most probably, I will use
shared keys.
Regards
From: Da
El día 23 de marzo de 2011 11:18, Adrian Klaver
escribió:
> On Wednesday, March 23, 2011 6:57:35 am Martín Marqués wrote:
>
>> Now I'm getting weirder things. I did a pg_dump with -d option and the
>
>> dump adds strange caracters:
>
> As previously stated try using the 8.4 version of pg_dump to d
What kind of account are we talking about? A user account, an accounting
account, a customer account, something else?
IF you were to use a non-shared foreign key in the application_account table
which primary key would you use within the other tables in the application if
you need to refer
Disc Magnet writes:
> CREATE AGGREGATE myavg(float8) (
> sfunc = float8_accum,
> stype = float8[],
> finalfunc = float8_avg,
> initcond = '{0,0}'
> );
> On trying to run this, I get this error:
> cdb=# select myavg(value) from numbers;
> ERROR: float8_accum: expected 3-element f
Dear Johnston,
Thanks for the reply, I really get a lot of benefit from it. In my design, I
have several accounts which share some information at least id an the name. So,
I want to make a specialization tree. Also, I want to use the ids as a
global Identifiers in different scopes. So, I want t
On Wednesday, March 23, 2011 6:57:35 am Martín Marqués wrote:
> Now I'm getting weirder things. I did a pg_dump with -d option and the
> dump adds strange caracters:
As previously stated try using the 8.4 version of pg_dump to dump the 8.3
database. FYI in 8.4+ there is no -d option anymore, it h
On Wed, Mar 23, 2011 at 3:33 AM, Merrick wrote:
> Hi,
>
> I am looking for some advice on where to troubleshoot after 1 drive in
> a RAID 1 failed.
>
> Thank you.
>
> I am running v 7.41, I am currently importing the data to another
> physical server running 8.4 and will test with that once I can.
Adrian Schreyer writes:
> The actual C++ function looks roughly like this
> extern "C"
> char *function(bytea *b)
> {
>string ism;
>[...]
>return ism.c_str();
> }
My C++ is pretty rusty, but is the pointer returned by c_str() still
valid after the string variable goes out of scope?
On Wed, Mar 23, 2011 at 9:04 AM, dennis jenkins
wrote:
> On Wed, Mar 23, 2011 at 5:08 AM, Adrian Schreyer wrote:
>>
>> you are right, it returns a char *.
>>
>> The prototype:
>>
>> char *function(bytea *b);
>>
>> The actual C++ function looks roughly like this
>>
>> extern "C"
>> char *function(
On Wed, Mar 23, 2011 at 8:03 AM, Disc Magnet wrote:
> I was learning how to create my own aggregate functions from
> http://www.postgresql.org/docs/9.0/static/xaggr.html
>
> I copied the avg() example as
>
> CREATE TABLE numbers (
> value integer
> );
>
> insert into numbers values (2);
> inser
On Wed, Mar 23, 2011 at 5:08 AM, Adrian Schreyer wrote:
>
> you are right, it returns a char *.
>
> The prototype:
>
> char *function(bytea *b);
>
> The actual C++ function looks roughly like this
>
> extern "C"
> char *function(bytea *b)
> {
> string ism;
> [...]
> return ism.c_str();
> }
>
The main significant advantage that NOT making the primary key also a
foreign key is that you can set the foreign key reference to ON DELETE SET
NULL. If they are shared this will not work since a primary key cannot be
NULL.
However, if you are going to do "ON DELETE CASCADE" anyway then the m
Now I'm getting weirder things. I did a pg_dump with -d option and the
dump adds strange caracters:
ERROR: error de sintaxis en o cerca de «I»
LÍNEA 1: I^NSERT INTO objeto_datos_rep VALUES (1172339, 387943, 'Wilde...
Could it be binary corruption (pg_dump for example)?
2011/3/23 Vick Khera :
>
I was learning how to create my own aggregate functions from
http://www.postgresql.org/docs/9.0/static/xaggr.html
I copied the avg() example as
CREATE TABLE numbers (
value integer
);
insert into numbers values (2);
insert into numbers values (3);
insert into numbers values (4);
CREATE AGGR
2011/3/23 Martín Marqués :
> The scenario is like this. I tried today to dump a DB from our
> production server to load on our development server and got some
> errors, which I show below.
Try using the pg_dump from the 8.4 install to create your dump file.
Also make sure your 8.3 installation d
Hi all,
I'm having problems with pg_dump, apparently, from one of our servers.
The scenario is like this. I tried today to dump a DB from our
production server to load on our development server and got some
errors, which I show below.
Production server:
SELECT version();
Hello,
Some times the primary key is the same as the foreign key such as in the
following design. which is used to model 1-1 relationship.
In the database books, such as database fundamentals(Masri), the 1-1 relation
is
modeled by having two separate key.
when this kind of design (shared ke
On Tue, Mar 22, 2011 at 22:21, David W Noon wrote:
> On Tue, 22 Mar 2011 16:14:47 -0500, Merlin Moncure wrote about Re:
> [GENERAL] Weird problems with C extension and bytea as input type:
>
> [snip]
On Tue, Mar 22, 2011 at 8:22 AM, Adrian Schreyer
wrote:
> [snip]
> bytea *b = PG_GE
On Mar 22, 2011, at 5:20 AM, runner wrote:
> A) CREATING FILESSYSTEM SNAPSHOTS - We're snapping the data, wal and archive
> directories. We only plan on using the data snap and that's just so we can
> perform the backup faster. Will the wal and archive snapshots be useful for
> anything?
On Mar 23, 2011, at 11:48 AM, Toby Corkindale wrote:
> I wondered if there were any software packages floating around to manage
> servers using streaming replication with Pg?
>
> ie. To handle failing over and adjusting the config to promote a slave; and
> performing the steps of syncing and r
On Tue, Mar 22, 2011 at 22:21, David W Noon wrote:
> On Tue, 22 Mar 2011 16:14:47 -0500, Merlin Moncure wrote about Re:
> [GENERAL] Weird problems with C extension and bytea as input type:
>
> [snip]
On Tue, Mar 22, 2011 at 8:22 AM, Adrian Schreyer
wrote:
> [snip]
> bytea *b = PG_GE
> Hi,
>
> I am looking for some advice on where to troubleshoot after 1 drive in
> a RAID 1 failed.
>
> Thank you.
>
> I am running v 7.41, I am currently importing the data to another
> physical server running 8.4 and will test with that once I can. In the
> meantime here is relevant info:
>
> Bac
On 03/22/11 11:18 PM, Toby Corkindale wrote:
Hi,
I wondered if there were any software packages floating around to
manage servers using streaming replication with Pg?
ie. To handle failing over and adjusting the config to promote a
slave; and performing the steps of syncing and restarting to
Hi,
I am looking for some advice on where to troubleshoot after 1 drive in
a RAID 1 failed.
Thank you.
I am running v 7.41, I am currently importing the data to another
physical server running 8.4 and will test with that once I can. In the
meantime here is relevant info:
Backups used to take 25
65 matches
Mail list logo