Re: inserting values like in mySQL

Поиск
Список
Период
Сортировка
От Nabil Sayegh
Тема Re: inserting values like in mySQL
Дата
Msg-id 20010522214949.768BB14EE63@gerstung3.net-lab.net
обсуждение исходный текст
Ответ на inserting values like in mySQL  (Peter Asemann <Peter.Asemann@rrze.uni-erlangen.de>)
Ответы Re: inserting values like in mySQL  (Chris Smith <csmith@squiz.net>)
Список pgsql-novice
On 18 May 2001 18:03:25 +0200, Peter Asemann wrote:
> In mySQL it was like this:
>
> insert into users values ('','peter','my_pass');
>
> In PostGreSQL this does not work. The only thing that works is
>
> insert into users (name,pass) values ('peter','my_pass');


Yes, thats not nice in postgresql. But there is a workaround.
Put the 'default' fields at the end:

---------------8<---------------------
CREATE TEMP TABLE tempo (test bool, id serial);

INSERT INTO tempo values (true);

SELECT * from tempo;
---------------8<---------------------

 test | id
------+----
 t    |  1
(1 row)

Hope it helps.

P.S.: I'd really like postgresql to behave like mysql in this context
P.S.S.: Perhaps also in the GROUP BY context :)

--
 Nabil Sayegh



В списке pgsql-novice по дате отправления:

Предыдущее
От: "Giorgio A."
Дата:
Сообщение: Re: inserting values like in mySQL
Следующее
От: Chris Smith
Дата:
Сообщение: Re: inserting values like in mySQL