Carlos Costa <[EMAIL PROTECTED]> writes:
> SELECT oid,xmin,xmax,ctid,id FROM articles WHERE id=391;
>oid | xmin| xmax| ctid | id
> -+---+---+--+-
> 3032469 | 152691945 | 152886684 | (104,6) | 391
> 3032469 | 152886687 | 156995994 | (104,1
Thank you very much.
Here is the output:
SELECT oid,xmin,xmax,ctid,id FROM articles WHERE id=391;
oid | xmin| xmax| ctid | id
-+---+---+--+-
3032469 | 152691945 | 152886684 | (104,6) | 391
3032469 | 152886687 | 156995994 | (104,13) | 391
Carlos Costa wrote:
Hello all!
There is an extrange error in my logfile:
update articles set online='t' where id = 391 ;
ERROR: duplicate key violates unique constraint "articles_pkey"
(the error exists only with this id)
I've checked (well, almost imposible) if there was more than one
article wit
Hello all!
There is an extrange error in my logfile:
update articles set online='t' where id = 391 ;
ERROR: duplicate key violates unique constraint "articles_pkey"
(the error exists only with this id)
I've checked (well, almost imposible) if there was more than one
article with this id:
sele
:((
sorry
At server ther is istalled pgsql 7.1.2 but creatlang works from 7.2.X
and upper version :(
do you have any other ideas??
elein wrote:
You just need to define 'plpgsql' as a language in
your database. At the shell, to define the language use:
createlang 'plpgsql' ;
After you do
I was wondering if there was a reliable method to get the last id
inserted into a serial column in a table. I believe previous
recommendations given were to use a sequence, have your app get the
nextval for the sequence and then use that in the insert. I was
wondering if things had changed or if
Christian Marschalek writes:
> The serial data type automaticaly takes the next higher value, but what
> if there's a drop and I want to assing 3 even if there are 20 records
> and the next higher number would be 21 not 3?
Then you can't use the serial type. Coding hole-filling serial numbers
c
Hi Chris,
If you do an INSERT straight into the table, AND also make sure you give
it the value you want in the serial column, it will accept it and not
increment the serial column's counter.
There are also a few function which are useful with the serial type :
currval()
setval()
nextval()
See
I'm trying to create a table as such:
create table comment
(rec_id serial,
locale varchar(50),
...)
It creates correctly, telling me that it will create an implicit sequence
for the serial column, and an implicit index for the table. But, when I
try to insert a record into the database (withou