user: admin
password: password
user: joe
password: password
pg_dump.exe --host $host --port 5432 --username $userName --format plain --create --verbose --file $fileName $databaseName | |
To restore backup done with plain format | |
psql -a -h $host -p 5432 -U $user -d $database -f $fileName -o restore.log | |
To restore backup done with other format | |
pg_restore -h $host -U $user --verbose -d $databaseName -C $backupFileName [2> restore.log] | |
Synonyms to close an issue with commit message
Testing spring web flow with hibernate option AvailableSettings.ENABLE_LAZY_LOAD_NO_TRANS enabled to verify if the connection leak on Lazy Load without transaction disappear | |
https://hibernate.onjira.com/browse/HHH-7524 |
procedure ReplaceArray; | |
var | |
vPerson: IBSONObject; | |
vAddresses, | |
vNewAddresses: IBSONArray; | |
begin | |
//Insert person | |
vAddresses := TBSONArray.NewFromValues(['one address', 'two address']); | |
vPerson := TBSONObject.NewFrom('id', 1).Put('name', 'fabricio').Put('addresses', vAddresses); | |
FCollection.Save(vPerson); |
Above we have looked at just a few of the available HTTP codes; there are many others. Some are very well-known, such as 404 Not Found, but others are quite obscure and don't crop up very often. Whatever the case, the first digit is always an indication of the family of codes they belong to:
1xx (Informational)
: Request received, continuing process.2xx (Successful)
: The action was successfully received, understood, and accepted.3xx (Redirection)
: Further action needs to be taken in order to complete the request.4xx (Client Error)
: The request contains bad syntax or cannot be fulfilled.5xx (Server Error)
: The server failed to fulfil an apparently valid request.select 'ALTER FUNCTION ' || quote_ident(routine_schema) || '.' || quote_ident(routine_name) || ' OWNER TO ' ||routine_schema || ';' | |
from information_schema.routines | |
where specific_schema NOT LIKE E'pg\\_%' | |
and specific_schema <> 'information_schema' | |
and specific_schema <> 'public' | |
/*AND specific_schema = $YourSchema leave commented for all */ | |
union all | |
SELECT 'ALTER TABLE ' || quote_ident(s.nspname) || '.' || quote_ident(s.relname) || ' OWNER TO ' || nspname || ';' | |
FROM (SELECT nspname, relname | |
FROM pg_class c |
//Anonymous procedure approach by Lars Fosdal | |
type | |
TArg<T> = reference to procedure(const Arg: T); | |
procedure TForm1.CaptureConsoleOutput(const ACommand, AParameters: String; CallBack: TArg<PAnsiChar>); | |
const | |
CReadBuffer = 2400; | |
var | |
saSecurity: TSecurityAttributes; | |
hRead: THandle; |
From http://www.cesarromero.com.br/script-para-baixar-atualizacoes-de-repositorios-subversion-mercurial-e-git | |
@echo off | |
::-------------------------------------------------------------------------- | |
:: Copyright (c) 2012-2013, Cesar Romero | |
:: All rights reserved. | |
:: | |
:: Code license Mozilla Public License 1.1 | |
:: | |
:: Redistribution and use in source and binary forms, with or without |
Revert último commit | |
$ git commit ... //Commit equivocado | |
$ git reset --soft HEAD^ //Desfaz commit | |
Revert added file | |
$ git add [file] | |
$ git reset [file] |