Alex Cheshev wrote:
Hello.
A table has two primary keys:
It appears that you really meant "a table has a two-field composite
primary key". There can only be one primary key for a table, that's the
whole point - but the primary key can be composed of more than one field.
[Note: if you forma
am Fri, dem 25.07.2008, um 15:54:23 +1100 mailte Alex Cheshev folgendes:
> Hello.
> A table has two primary keys: CREATE TABLE example ( pk1 integer, pk2
> integer, PRIMARY KEY (pk1, pk2) ). To add a new record I use command:
> INSERT INTO example (pk1, pk2) VALUES (0, 0). Before adding the new
Hello.
A table has two primary keys: CREATE TABLE example ( pk1 integer, pk2
integer, PRIMARY KEY (pk1, pk2) ). To add a new record I use command:
INSERT INTO example (pk1, pk2) VALUES (0, 0). Before adding the new
record I have to find out the last value of pk2. How can I use something
like t
> 2.
> Another problem was that no matter how many times I checked and
> re-checked code, or which pg_fetch_* function I used, copying an array
> member and trying to use it later just would not work, eg
>
> while ($row = pg_fetch_array($query)) {
> $content = $row[0]
> }
>
> echo $content;
> There does seem to be some evidence of problems historically with PHP
> and persistent connections in PostgreSQL, on the PHP forums. The advice
> is typically to avoid them.
You'll find the same advice for mysql + persistent connections or any
other db + persistent connections. It's not a php+p
On Thu, Jul 24, 2008 at 7:06 PM, Stephen Frost <[EMAIL PROTECTED]> wrote:
> * John D. Burger ([EMAIL PROTECTED]) wrote:
>> My understanding is that PG will use an index on the referring side of a
>> foreign key for FK checks. How can I tell whether it's doing that?
>
> It should, when it makes sen
Stephen Frost <[EMAIL PROTECTED]> writes:
> * John D. Burger ([EMAIL PROTECTED]) wrote:
>> My understanding is that PG will use an index on the referring side of a
>> foreign key for FK checks. How can I tell whether it's doing that?
There isn't any very good way at the moment :-(
> If more t
* John D. Burger ([EMAIL PROTECTED]) wrote:
> My understanding is that PG will use an index on the referring side of a
> foreign key for FK checks. How can I tell whether it's doing that?
It should, when it makes sense, yes. Having the actual schema
definitions would help in debugging this, o
On Thursday 24 July 2008 12:41, admin wrote:
> 1.
> I ended up using pg_prepare() and pg_execute() as pg_query() alone just
> didn't seem to work. But SELECT statements seemed to be cached or
> persistent in some way, such that they "lived" beyond the life of the
> PHP script. Is there something I
Hi -
My understanding is that PG will use an index on the referring side
of a foreign key for FK checks. How can I tell whether it's doing
that? EXPLAIN ANALYZE just shows something like this:
=> explain analyze delete from segments where segmentid = 24305259;
JD Wong wrote:
Does anybody know how to insert data over multiple tables
transactionally? The relationship is 1:1 with the latter table having
a foreign key constraint. In order to add data to Table2 I need to
know the primary key value of the same record in Table1 before it's
committed, whi
It'd been a couple of years since I wrote a program to convert some
random database to PostgreSQL, and it seemed like time to crank out
another one. The results, PgDBF, are available under the GPLv3 and
downloadable from http://honeypot.net/project/pgdbf .
Why yet another program to conver
[EMAIL PROTECTED] wrote on 07/24/2008 01:36:27 PM:
> Does anybody know how to insert data over multiple tables
> transactionally? The relationship is 1:1 with the latter table
> having a foreign key constraint. In order to add data to Table2 I
> need to know the primary key value of the same
On Thu, Jul 24, 2008 at 3:57 PM, Shane Ambler <[EMAIL PROTECTED]> wrote:
> Shane Ambler wrote:
>>
>> [EMAIL PROTECTED] wrote:
>>
>>> Is the otool program on your system anywhere? Afaik, it should be on
>>> any Mac, but maybe it's part of xcode (i hope not- can anyone
>>> confirm?)
>>
>> I have a fe
Does anybody know how to insert data over multiple tables transactionally?
The relationship is 1:1 with the latter table having a foreign key
constraint. In order to add data to Table2 I need to know the primary key
value of the same record in Table1 before it's committed, which in this case
is a
On Thu, Jul 24, 2008 at 12:55 PM, John DeSoi <[EMAIL PROTECTED]> wrote:
>
> On Jul 24, 2008, at 1:51 AM, Tom Lane wrote:
>
>> Relative paths sound like the best solution to me, assuming they work.
>
> Relative paths work fine. I use this all the time for distributing psql. It
> looks something like
Viktor Rosenfeld <[EMAIL PROTECTED]> writes:
> Postgres is indeed selecting a bad plan. Turns out that the index I
> created to speed up the UPDATE isn't used inside a transaction block.
I was having a hard time believing that, but just noticed that there is
a case in which it could be expected
AlannY <[EMAIL PROTECTED]> writes:
> Many times, I'm confronting with that strange problem: invalid byte
> sequence for encoding "UNICODE". So, I guess, Postgresql can't allow me
> to use some symbols which is not a part of UNICODE. But what is that
> symbals?
Doesn't it tell you? AFAICS every
Hi there.
Many times, I'm confronting with that strange problem: invalid byte
sequence for encoding "UNICODE". So, I guess, Postgresql can't allow me
to use some symbols which is not a part of UNICODE. But what is that
symbals?
I'm attaching a screenshot with THAT dead-symbol. As you can see
On Thu, Jul 24, 2008 at 6:33 AM, admin <[EMAIL PROTECTED]> wrote:
> Thanks again for replies.
> I know those questions were pretty vague.
> I need to set up some methodical test scripts that replicate my problems, so
> that it is clear what is going on.
>
> There does seem to be some evidence of pr
Definitely believable. It gives me an internal avenue to chase down.
Thanks
--Rick
Alvaro Herrera wrote:
Rick Weber wrote:
While working on tuning my database, I was experimenting with changing
the wal_sync_method to try to find the optimal value. The really odd
thing is when I swi
Rick Weber wrote:
> While working on tuning my database, I was experimenting with changing
> the wal_sync_method to try to find the optimal value. The really odd
> thing is when I switch to open_sync (O_SYNC), Postgres immediately fails
> and gives me an error message of:
>
> 2008-07-22 11:
Rick Weber <[EMAIL PROTECTED]> writes:
> Basic system setup:
> Linux 2.4 kernel (heavily modified)
"Heavily modified" meaning what exactly?
Given that no one else has reported such a thing, and the obvious
bogosity of the errno code, I'd certainly first cast suspicion on the
kernel.
Basic system setup:
Linux 2.4 kernel (heavily modified)
Dual core Athlon Opteron
4GB ECC RAM
SW RAID 10 configuration with 8 750 Gb disks (using only 500Gb of each
disk) connected via LSISAS1068 based card
While working on tuning my database, I was experimenting with changing
the wal_sync_me
I understand that a cursor can be opened and used through sql commands.
However, when a host application accesses a particular row on a particular
table can that be detected within the sql medium?
Or does that information have the be accessed by transmitting from the host?
Bob
--
Sent via
Thanx for tip, Tom. I'll definitely give that a try in my spare time.
Cheers,
Kevin
Tom Lane wrote:
Kevin Neufeld <[EMAIL PROTECTED]> writes:
Tom Lane wrote:
A superuser can create whatever he wants in pg_catalog. Whether this
is a good idea or will behave smoothly is a topic that has not be
Kevin Neufeld <[EMAIL PROTECTED]> writes:
>> Tom Lane wrote:
>>> A superuser can create whatever he wants in pg_catalog. Whether this
>>> is a good idea or will behave smoothly is a topic that has not been
>>> thought about, to my knowledge.
> Sorry, Tom. I think you are mistaken. In my 8.3 inst
On Thu, 24 Jul 2008 11:13:52 -0400
"David Spadea" <[EMAIL PROTECTED]> wrote:
> Mick,
>
> As I haven't seen anyone else say it, I just wanted to throw this
> in.
>
> I'm not a PHP programmer, so I'm not very sure of PHP's scoping
> rules, but this looks to me like a variable scoping problem. If
>
Tom Lane wrote:
A superuser can create whatever he wants in pg_catalog. Whether this
is a good idea or will behave smoothly is a topic that has not been
thought about, to my knowledge.
regards, tom lane
Sorry, Tom. I think you are mistaken. In my 8.3 instance, system
catalo
The second problem is now solved !
> Second problem:
> When I try to give the output table, only the first line is correctly
> returned.
> I have introduced an analyse stage which reveals that the problem comes from
> the loss of the information in my matrix data structure when the function is
> c
Mick,
As I haven't seen anyone else say it, I just wanted to throw this in.
I'm not a PHP programmer, so I'm not very sure of PHP's scoping rules,
but this looks to me like a variable scoping problem. If the first
time you've used $content is inside of the while(), it's probably
going out of scop
Really? I didn't know that ... guess I never tried. I'll have to do
some experimenting! Thanx Tom.
-- Kevin
Tom Lane wrote:
Kevin Neufeld <[EMAIL PROTECTED]> writes:
This might seem like a silly question, but what are the implications of
PostgreSQL allowing developers to create custom catal
Shane Ambler wrote:
[EMAIL PROTECTED] wrote:
Is the otool program on your system anywhere? Afaik, it should be on
any Mac, but maybe it's part of xcode (i hope not- can anyone
confirm?)
I have a few installs here.
now that I think about it - it may be a dev tools only thing.
otool is incl
Thanks again for replies.
I know those questions were pretty vague.
I need to set up some methodical test scripts that replicate my
problems, so that it is clear what is going on.
There does seem to be some evidence of problems historically with PHP
and persistent connections in PostgreSQL, on
On Jul 24, 2008, at 1:51 AM, Tom Lane wrote:
Relative paths sound like the best solution to me, assuming they work.
Relative paths work fine. I use this all the time for distributing
psql. It looks something like this:
install_name_tool -change /path/to/postgresql/lib/libpq.dylib
@execu
On 2008-07-23 21:24, Keaton Adams wrote:
> We run into a problem when an equality search on a timestamp column
> returns no records, even when there are records to return, as in this
> example:
>
> mxl=# select * from mxl_scheduler_queue where status_modified =
> '2008-07-03 16:55:06.44695-06';
FIRST PROBLEM IS SOLVED !
> First problem:
> When I try to get the input table, the first element is forgotten, then, the
> whole matrix is wrong! I have no idea of what happens
>
> Example:
> Input table Matrix obtained
> By reading tuple by tuple
On Thu, 24 Jul 2008 12:30:22 +0200
"Leif B. Kristensen" <[EMAIL PROTECTED]> wrote:
> On Thursday 24. July 2008, admin wrote:
> >while ($row = pg_fetch_array($query)) {
> > $content = $row[0]
> >}
> >
> >echo $content;
> >
> >$content was always 'undeclared'.
>
> You have to use an intermediate
On Thu, 24 Jul 2008 19:11:36 +0930
admin <[EMAIL PROTECTED]> wrote:
> 2.
> Another problem was that no matter how many times I checked and
> re-checked code, or which pg_fetch_* function I used, copying an
> array member and trying to use it later just would not work, eg
>
> while ($row = pg_fet
On Thursday 24. July 2008, admin wrote:
>It seems that some of PHP's PG functions have changed recently, are
>there any known issues with them?
I've been using PHP with PostgreSQL for 5 years, and haven't noticed any
substantial changes.
>while ($row = pg_fetch_array($query)) {
> $content = $
Guillaume Bog wrote:
On Wed, Jul 23, 2008 at 11:17 PM, Richard Huxton <[EMAIL PROTECTED]> wrote:
I tried a vacuum full and had to stop it as it was blocking the server for
too long. Below is the partial results I got. It seems you are right:
enormous amount of dead space and rows. I did the same
On 24/07/2008 11:13, Raymond O'Donnell wrote:
$rs = pg_query($sql_string);
while ($row = pg_fetch_assoc($rs)
Whoops! -
while ($row = pg_fetch_assoc($rs))
Ray.
--
Raymond O'Donnell, Director of Music, Galway Cathedra
Hi Mick,
1.
I ended up using pg_prepare() and pg_execute() as pg_query() alone
just didn't seem to work. But SELECT statements seemed to be cached
or persistent in some way, such that they "lived" beyond the life of
the PHP script. Is there something I need to know about persistent
behav
admin wrote:
First, thanks to everyone who responded to my newbie questions
yesterday, all clear now.
I spent most of today struggling with apparently inconsistent behaviour
while running SELECT statements on PG 8.1.9 using PHP 5.1.6 (these are
both as supplied with CentOS 5.1, a fairly conse
On 24/07/2008 10:41, admin wrote:
I ended up using pg_prepare() and pg_execute() as pg_query() alone just
didn't seem to work. But SELECT statements seemed to be cached or
persistent in some way, such that they "lived" beyond the life of the
PHP script. Is there something I need to know about
Dear Postgre co-users,
---
I just submit to this mailing list and I am not a really good English speaker,
so excuse me if I don't respect some of the rules to apply. Just tell me!
I work on Win32 OS with Postgre/Postgis/PgAdmin and I build dlls with DevCpp to
create C functions.
admin wrote:
> First, thanks to everyone who responded to my newbie questions
> yesterday, all clear now.
>
> I spent most of today struggling with apparently inconsistent behaviour
> while running SELECT statements on PG 8.1.9 using PHP 5.1.6 (these are
> both as supplied with CentOS 5.1, a fairl
First, thanks to everyone who responded to my newbie questions
yesterday, all clear now.
I spent most of today struggling with apparently inconsistent behaviour
while running SELECT statements on PG 8.1.9 using PHP 5.1.6 (these are
both as supplied with CentOS 5.1, a fairly conservative distro
Finally I create a function like:
CREATE OR REPLACE FUNCTION nonsensible (text) RETURNS text AS $$
DECLARE
var1 varchar;
BEGIN
var1=replace($1, 'á', 'a');
var1=replace(var1, 'é', 'e');
var1=replace(var1, 'í', 'i');
var1=replace(var1, 'ó', 'o');
var1=replace(var1, 'ú', 'u');
var1=repl
> How can I
> > even include something *outside* a transaction *inside* it
I was referring to conditions outside the database which you
detect while the transaction is in progress and which
invalidate the semantic integrity of the transaction as a
whole. Under such circumstances you would want to
50 matches
Mail list logo