Re: [SQL] Subselects not allowed?

2011-06-14 Thread Florian Weimer
* Leif Biberg Kristensen:

> And even better, in the first comment to the blog post, I was advised about 
> the 
> SETVAL() function which does exactly what I wanted in the first place.
>
> CREATE SEQUENCE persons_person_id_seq;
> SELECT SETVAL('persons_person_id_seq', MAX(person_id)) FROM persons;
> ALTER TABLE persons ALTER COLUMN person_id SET DEFAULT 
> NEXTVAL('persons_person_id_seq');
> ALTER SEQUENCE persons_person_id_seq OWNED BY persons.person_id;

I think you should acquire an exclusive lock on the table, too.

-- 
Florian Weimer
BFK edv-consulting GmbH   http://www.bfk.de/
Kriegsstraße 100  tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


[SQL] Storage of Indian Language text in postgresql through PHP

2011-06-14 Thread INDER
Hello Everyone. I am new to this group and as well as to the Postgres
also. Can anybody tell me that how to insert hindi text into postgres
that a user has entered from html input with the use of PHP. Please I
am waiting for the reply.

-- 
Sent via pgsql-sql mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql


Re: [SQL] Storage of Indian Language text in postgresql through PHP

2011-06-14 Thread Amitabh Kant
On Tue, Jun 14, 2011 at 12:47 PM, INDER  wrote:

> Hello Everyone. I am new to this group and as well as to the Postgres
> also. Can anybody tell me that how to insert hindi text into postgres
> that a user has entered from html input with the use of PHP. Please I
> am waiting for the reply.
>
>
Not sure what you would have to do from PHP side, but make sure that when
you are creating the database, the encoding is set to UTF8 for db to support
Hindi.

Amitabh