🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.os.linux.programowanie
Article #394

Re: Postgres SQL - default

#394
From: Kamil Jonca
Date: Tue, 14 Sep 1999 19:30
31 lines
1617 bytes
Dnia  Tue, 14 Sep 1999 07:45:59 +0200,
osoba podpisana: isthar <isthar@sote.poznan.pl>
napisała:
>Czesc.
>
>Sprawa dotyczy sql-a w jego postgresowej wersji.
>po zdefiniowaniu kolumny w tabeli jako typ serial
>
>create table x (
>    id serial,
>    test char(4)
>)

>powinienem otrzymac kolumne id z automatycznym numerowaniem.
>nie wiem tylko jak podczas insertu zamarkowac to pole
>by nie bylo bledu skladni a jednoczesnie numerowanie dzialalo by.

W SQL-ubędzie tak 
insert into x(test) values('dupa');
		^
		|
		Wstawiasz tylko do tego pola.

na perl(?) możesz sobie sam przerobić.

KJ

-- 
Kamil Jońca GIT d s+:- a-- C++ UL P+ L++ E W N+ w- PS+ PE++ PGP t-- X-- R- tv-
b+ D+ G e h-- r- z?
EMACS = Even a Master of Arts Comes Simpler
Technical Details
Message-ID: <slrn7tt8i0.36c.kjonca@kjonca.kjonca.bogus>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!not-for-mail
References: <37DDE115.98949EBD@sote.poznan.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!pingwin.icm.edu.pl!mat.uni.torun.pl!news.man.torun.pl!news.icm.edu.pl!not-for-mail
From: kjonca@kjonca.kjonca.bogus (Kamil Jonca)
Newsgroups: pl.comp.os.linux.programowanie
Subject: Re: Postgres SQL - default
Date: 14 Sep 1999 19:30:09 GMT
Organization: A poorly-maintained Debian GNU/Linux InterNetNews site
Lines: 31
Message-ID: <slrn7tt8i0.36c.kjonca@kjonca.kjonca.bogus>
References: <37DDE115.98949EBD@sote.poznan.pl>
Reply-To: Kamil Jonca <kjonca@pol.pl>
NNTP-Posting-Host: newport-028.ports.pol.pl
Mime-Version: 1.0
X-Trace: sunsite.icm.edu.pl 937342862 25149 212.106.2.28 (14 Sep 1999 21:01:02 GMT)
X-Complaints-To: abuse@news.icm.edu.pl
NNTP-Posting-Date: 14 Sep 1999 21:01:02 GMT
User-Agent: slrn/0.9.5.6 (UNIX)
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit