Re: custom serial number

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: custom serial number
Date: 2008-11-18 09:42:23
Message-ID: 20081118094222.GD19076@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

am Tue, dem 18.11.2008, um 10:37:23 +0100 mailte Pavel Stehule folgendes:
> Hello
>
> what do you wont to do exactly?
>
> you can try -
>
> create sequence s;
> postgres=# create sequence s;
> CREATE SEQUENCE
> postgres=# select to_char(current_date, 'yyyymmdd') ||
> trim(to_char(nextval('s'), '0000'));
> ?column?
> --------------
> 200811180002
> (1 row)

What's wrong with your sequence, it starts with 2?

SCNR *g*

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Pavel Stehule 2008-11-18 09:45:36 Re: custom serial number
Previous Message Pavel Stehule 2008-11-18 09:37:23 Re: custom serial number