Hi,
2011/8/25
> Hello to all,
>
>
> Can anybody tell me the sql instruction to create a new table with a select
> of other table?
>
> I need to create a new table based on paralell of a table of lines. Can
> anybody post to me a example?
>
>
CREATE TABLE t AS
SELECT * FROM x;
2010/11/25 KM
> On 2010-11-24, "Mikhail V. Puzanov" wrote:
> > Next, I execute the following two queries for that table:
> >
> >-- increment and get the counter if exists
> > UPDATE sequences SET counter = counter + 1
> > WHERE section = 'testSection' AND name = 'testKey'
> > RETURNING
2010/11/25 Tom Lane
> "Mikhail V. Puzanov" writes:
> >-- increment and get the counter if exists
> > UPDATE sequences SET counter = counter + 1
> > WHERE section = 'testSection' AND name = 'testKey'
> > RETURNING counter;
>
> Seems that what you have here is a bad manual implementation
There's contrib module for it, uuid-ossp.
It should be available as a package for most
OSes and distributions, I guess.
Hi All,
>
> I have a column in my Postgresql database tables which need UUID.
>
> Is there any function in Pgsql for UUID generation. Please help me in this
> regard.
>
> --
> R